-
Introduction
-
What you shloud expect?
-
Topics Coverd
- Footprinting & Reconnaissance
- Networking Fundementals
- Cryptography
- Scanning & Enumeration
- Penetration
- Malware
- DoS
- Web Apps Hacking
- Wireless Networking
- Detection Evasion
- Programming Attacks
-
Approach
- Where Possible, Hands on
- Theoretical where necessary
-
What is Hacking?
-
Early Days
- A person who delights in having an intimate understanding of the
internal working of a system,computers and computers networks in particular
- Tech Model Railroad Club @ MIT
- Detailed in Steven Levy's book Hackers
-
Morphing
- Robert T Morris - Morris Worm in 1988
- Kevin Mitnick - Various acts of computer crime over decades
-
In popular Culture
- War Games
- Hackers
- Matrix movies (use of nmap)
- Sneakers
- Swordfish
- NCIS (regularly crack complex crypro in minutes)
-
What is hacking, REALLY?
- Deep Understanding
- Exploration
- Joy of learning new things
- Digging into problems to find solutions
- Sometimes finding problems where there weren't problems previously
-
Why Hack?
- Sometimes just fo fun
- Sometimes to make a social or political point
- Sometimes just for the challenge
- To prevent theft
- To get there before the bad guys
- To protect yourself
-
Types of hacking
- Ethical Hacking = Whtehat Hacking
- Blackhat Hacking
- Gray hat Hacking
- Hacktivism
- Legal Issues Around Hacking
-
Methodology
- OSSTMM 2.1
- Penetration Testing Methodology (OISSG)
-
Types of Attacks
-
Defacing
- Making alternations to something
- Primatily a web site thing
-
Buffer Overflows
- Pices of data in memory called buffers
- When too much data is sent, it can overflow
- Because of stack memory & storig return addresses, a buffer overflow can lead to cntro of program flow
-
Format String Attacks
- The C programming language makes use of format string to determine how data is going to be input/output
- Leaving off the format string from I/O functions can lead to attackers providing
- This can yield information off the stack being pressented to the user
-
Denial of Service
- Prevents a service from being available to its legitimate authorized users
- SYN flood, PING flood, SMURF attack, malformed packets
-
Distributed Denial of Service
- Coordinated denial of service making use of several hosts on several locations
- Overwhelming use of resources
- Often botnets
- First known DDoS attack used a tool called Stacheldraht (Barbed Wire)
-
Skills
-
Computing
- Basic understanding of OSs
- Understanding of basic system software
- Basic understanding of how to use command line
-
Networking
- Cables, Switches, hubs
- How systems are networked
-
Life skills
- Ability to accept failure & persevere
- Ability to problem solve
- Abilit to be creative
- Ability to think out of the box
-
Penetration testing
- Testing to see if you can get in
- This may involve social engineering
- chnical approach
- Physical access
-
Goal
- Assessing weaknesses in a security posture
- Understanding risk position better
- Accessing systems to find weaknesses
-
Results
- Report detailing findings
- Should include remediation activities to fix vulnerabilities
-
Scope
- How bih is the bread box?
- Any exclusions? Any areas of no-touch?
- Must get sign-off from target organiwation
- Always get approval from the RIGHT people
-
Security Assessment
- Hand-in-hand approach
- Goal isn't penetrate but to fully assess risk
- Provide more detail about fixes
- May look at process issues in addition to technical issues
- Review policies where appropriate
-
Footprinting & Reconnaissance
-
What is footprinting
- Domain names
- Network blocks
-
Specific IP for critical systems
- Web server
- email server
- Databases
-
System architecture
- Intel
- Windows
- UNIX
-
Access Control Lists
- port scans
- IDS
-
System enumeration
- User names
- group nales
-
System banners
- Routing tables
- SNMP info
- DNS hostnames
-
Networking prorocls
- TCP/IP
- Ipx/Spx
- Appletalk
- Internal DNS
-
Remote Acess possibilties
- VPN
- Dialup
-
Extranet
- Connection point
- Access control
- Public or private?
-
History lessons :Way back Machine
- Archive.org/web/web.php
- netcraft.com
-
Using ressources
- www.monster.com
- LinkedIn
-
Using Whois Lookups
-
Regional Internet Registies
- ARIN
- LACNIC
- RIPE NCC
- AFRINIC
- APNIC
- ex : whois 129.35.47.17
- ex : whois -h whois.arin.net 129.35.47.17
- ex : whois infiniteskills.com
- geektools.com
- Whois for windows (download it)
-
Using DNS to Extract information
- nslookup
- host
- dig
- Finding Netwrok Ranges
-
Hacking Google
- "index of/"
- +
- filetype:config
- allintitle:sensitive
- inurl
- intext
-
Mining For Information Using Google
- intitle:error intext:mysql
- intex:apache/2
-
Networking Funddmdntals
-
History of TCP/IP
-
The Internet began in 1969
- ARPA commissioned a network in 1968
- BBN
- First connection was in 1969
-
First Protoclos
- 1822 protocol named for BBN Report 1822 defining communications
- Network Control Program took over afterwards
- NCP consisted of Arpanet Host-Host Protocol and initial Connection Protocol
-
First Router
- Interface Message Processor
- Ruggedized Honeywell computer with special interfaces & software
-
Birth of IP
- In 1973, Vinton Cerf & Robert Kahn reworked the existing ideas
- By 1974, a paper had been published proposing new protocols
- Proposed a central protocol called TCP
- Later; TCP was broken into TCP & IP
-
Getting to V4
- Between 1977 & 1977 versions 0 to 3 were in use
- V4 became the de facto protocol on the internet in 1983 when NCP was finally shut down
- in 1992, work began on IP Next Generation
- IPng became IPv6
-
IPv6 vs IPv4
- IPv6 has 128 bit addresses
- IPv4 has 32 bit addresses
- IPv6 attempted to fix some of the inhernet issues in IP
- Using WIRESHARK
-
OSI & TCP/IP Models
-
OSI
- Application
- Presentaion
- Session
- Transport
- Network
- Data Link
- Physical
-
TCP/IP
- Application Layer
- Transport Layer
- Internet Layer
- Network Access layer
-
Addressing
- IP Address -- 192.168.1.24
- 4 Octets (each octet seperated by a dot)
- Each octet is 8 bits
- 0 to (2^8 - 1) to 255
- Subnet mask -- 255.255.255.0
- 192.168.1 = Network portion
- .24 = Host Portion
- .0 = Network Address
- .255 = Broadcast address
- .1 - .254 available for hosts, so 245 host adresses available in this subnet
- UDP
- TCP
-
Services
- ls /etc/init.d
-
Using Wireshark for Deep Analysis
- Telepphony
- Statistics
- Decode as
- Folllow TCP stream
- DHCP
- ARP
-
Cryptography
-
History
-
Caesar Cipher
- Rotation Cipher
- Two rows of letters in alphabetical order, second row is shifted
-
Enigma Cipher
- Germans developed a cipher and a machine to encrypt & decrypt messages
- Lots of energy was spent trying to decrypt the messages
- Alan Turing, famous mathematician & computer scientist was involved in breaking
-
Digital Encryption Standard
- National Institutes of Standards & Technology had a roposal for a Digital Encryption Standard
- In 1977 IBM won the proposal with an algorithm on the Lucifer Cipher
-
3 DES
- 56 bit key for DES was inadequate
- To get time a new one, 3DES was developed
-
Uses 3 keys
- First Key used to encrypt plaintext
- Second key used to decrypt the ciphertext from first round
- Third key used to encrypt the cipher text from the second text
-
Advanced Encryption Standard
- Again, NIST requested proposals to replace the Digital Encryption Standards
- In 2001, NIST selected an algo called Rijndael to become the Advanced Encryption Standard
- Supports multiple key lengths
-
Types of Cryptography
-
Symetric
- cat text.txt
- aescrypt -e -p password text.txt
- ls text*
- text.txt text.txt.aes
-
Asymetric
- openssl genrsa -des3 -out private.key 4096
- openssl rsa -in private.key -pubout -out public.key
- openssl -encrypt rsault -encrypt -pubin -inkey public.key -in text.txt -out encrypted.txt
- Public Key Cryptography
- PGP
-
Certificates
- Validate your identity
- Encrypt
-
Hashing
- One way function
-
Used in
- File integrity
- Hashing Passwords
-
Ciphers
-
DES : Digital Encryption Standard
- Developed by IBM in1970s
- Originally a cryptographic cipher named Lucifer
- NSA requested changes
- Concern over changes ... controversy wondring if NSA requested backdoor
-
Technical Details
- 56 bit keys
- Block cipher
- Uses 64 bit blocks
-
DES Cracked
- In 1998, a DES-encrypted message was cracked in 3 days
- in 1999, a network of 10,000 desktop systems cracked a DES-encrypted message in less than 1 day
-
Triple DES
- DES algo used three times
- K1 is used to encrypt a message (P) resulting in C1 cipher text
- K2 is used to decrypt C1 resulting in C2 cipher text
- K3 is used to encrypt C2 rsulting in C3 cipher text
-
Technical Details
- 56 bit keys
- Yields effective key length of 168 bits
-
AES : Advanced Encryption Standard
- NIST requested proposal for AES
- In 2001, NIST published an algo called Rijndael as AES
-
AES Technical Specifications
- Rijndael specifies variable block sizes and key lengths, multipes of 32 bits
- AES specifies a fixed 128 bit block size but key lengths of 128, 192 & 256 bits
- SSL & TLS
-
SSH
- Encrypted version of Telnet
-
Disk Encryption
-
Cryptolcker
- Windows Ultimate
- Windows Entreprise
-
FileVault
- Mac
- Tructypt
- Cryptographic Analysis
-
Scanning & Enumeration
-
Types of Scans
- Ping
- sudo nmap -sT 192.168.1.0/24
- Vulnerability Scan
- Port Scanners
-
Using Nmap
- It's a port scanner
- sudo nmap -p0-65535 -sS -O -v 192.168.1.0/24
-
Other Types of Scans
- Idle scan
- -sX scan
- -sF Scan
- Using hping and its uses
- packeth
-
War Dialing
- www.iss.net
- www.thc.org
-
IDS Evasion
- Use packeth
- IP spoofing
- Fragmented Packets
- Nikto
-
Banner Grabbing
- telnet
- netcat
- dig mx
-
Vulnerability Scanning
- Nessus
- Nexpose
- QualysGuard
-
Enumeration Techniques
- Banner Grabbing
- Net view (On windows)
-
SNMP
- snmpwalk -v -1 punlic 192.168.1.12
- iReasoning MIB browser
- LDAP
- Using Proxies
- Tor & And Anonymizers
- Tunneling
-
Penetration
-
Goals
- Depends on the needs of your target
- Malicious attacker will have specific goals:
acces, information, êrsistant access & control
-
Access
- Could you break in?
- How easy was it?
- Can you repeat it?
- How?
-
Information
- Usernames
- Passwords
- Information about other systems
- Credentials for other systems
- Credit card number, ect
-
Persistent Access
- Can log inany time
- May involve back doors, depending on the channel used
-
Control
- Participation in botnet
- Use as a leaping off point to other systems
- Access to internal systems as needed
- Could be used as tunnel point to other systems
-
Viruses, Trojans ...
-
Definitions & History
-
History
- 1947 - First bug is found - a moth inside a system causing a system failure
- 1961 - Researchers at Bell Labs create a game where programs can kill other progras
- 1971 - Creeper virus on the ARPANet
- 1974 - Rabbit virus on the ARPANet
-
PC History
- 1982 - Elk Cloner on the Apple2. Boot sector virus
- 1986 - Brain virus. Worldwide. Fisrt IBM PC-based virus
- 1987 - Vienna virus. First virus to destroy data
- 1989 - IBM introduces Viruscan. First commercial Antivirus offering
-
Virus
- First Theoretical work done in 1947
- Self-replicating - can make copies of itself and find new hosts to move to by doing so
- May or may not be destructive in nature
- Uses other programs (attached)
-
Worm
- Also self-replicating
- Standalone
-
Trojan Horse
- Malicious software that looks like something else
-
Root Kit
- Hides existence of certain other types software
- May be used to maintain privileged access to a system
- Detection Of Malware
-
Anti-virus Evasion
- Make a unique backdoor
- Encode it
- Deployement of Malware
- WIndows ADS & Hiding Malware
-
Debugging
- OllyDbg
- Immunity
-
Packing and Automated A V Maker Tools
- Free UPX
-
DoS
- What is Dos DDoS
- Cyber Crime
-
Botnets
- Zeus
- Tride Flood Network
- Attack Countermeasures
-
Web Apps Hacking
-
Web Apps Testing?
- Burp Suite Pro
- Web App Architecture
-
Web Testin Tools
- Burp Suite Pro
- ZAP
- Addons (Browser)
- Cross Site Scripting
- SQL Injection
- Cross Site Request Forgery
- Session Hijacking And Attacks And Cookies
- Password Attacks
- Encoding
-
Wireless Networking
- Wireless Networking
-
Encryption Techniques
- WEP
- WPA
- WPA2
- Hospots
-
Breaking WEP
-
sudo airmon-ng
- Show the different interfaces installed in my system
- sudo airmon-ng start wlan0
- sudo airodump-ng mon0
- aircrack-ng
- Rogue Access Points And Attacks
- Wireless Sniffing
-
Protcting Wireless network
- Change the SSID to some random letters
- Disable the SSID broadcast
- Mac Authentication
-
Detecting Evasion
-
Evasion
-
What is Evasion
- Evade - get away from something
- Evasion is to avoid getting caught
- Might want to avoid a firewall or an intrusion detection system
-
Using Evasion
- Lots of diggerent techniques
- Log alteration
- Hding amidst noise
-
Why?
- Avoiding detection
- Similar strategies to malicious attackers
- If you can avoid detection (evade) it exposes additional weaknesses
-
Steganography
- Hiding info in something else
- steghide (linux)
-
Programming Attacks
- Stacks & Heaps
- BufferOverFlows
- Protecting against BO Attacks
- Format String
- De-Compliation
- Reverse Engineering