Advanced Network Forensics
Unit 2 - Network Forensics (Snort Rules, Port Scanning, Hydra)
Last Update Unknown
User/Password Crack
Hydra
Protocols supported:
- cisco
- cvs
- ftp
- ftps
- icq
- imap[s]
- irc
- Idap2[s]
- mssql
- mysql
- nntp
- oracle-listener
- oracle-sid
- pcanywhere
- pcnfs
- pop3[s]
- rdp
- rexec
- rlogin
- rsh
- sip
- smb
- smtp[s]
- smtp-enum
- snmp
- socks5
- svn
- telnet[s]
- vmauthd
- vnc
- xmpp
Click here to download the Wireshark capture for Hydra FTP used in the above 2 images.
Click here to download the Wireshark capture for Hydra Telnet used above.
Use network anomaly detection tools
- Monitor traffic flow for network anomalies
- Need to know what constitutes normal activity.
- For example, connections between machines that do not normally connect, either internally or between an inside machine and an unknown outside system are inherently suspicious.
- Products: IBM's QRadar, Juniper Sky Advanced Threat Protection, Snort IPS, Cisco's Encrypted Traffic Analytics, etc.
Use SSL/TLS proxy servers
- Manage 2 connections for every conversation
- Accept the encrypted connection on one network interface, decrypts the traffic, performs some operation, then re-encrypt and send the traffic to the destination
- Security operations, such as malware scanning and blocking prohibited sites.
- Take lot of processing power
NMAP Port Scanning
An Open port will respond with a SYN/ACK packet whilst a RST packet will indicate the port is closed.
Click here to download the Wireshark capture for NMAP used above.
UDP Scan
Null [...]
The Null Scan will send a TCP segment with no flags in the packet header. So this type of generated packets are illegal based on RFC 793.
So in Null Scan if a port is open then we will not get any response. In Null Scan no flags are set then target will not know how to handle the request. so target will discard the packet and no reply will be sent. If the port is closed, the target will send an RST packet in response.
Xmas Tree [FIN,PSH,URG]
It Sets the FIN, PSH, and URG flags, lighting the packet up like a Christmas tree.
Advantage of this scan is that it can sneak through non-stateful firewalls and packet filtering routers. Such firewalls try to prevent incoming TCP connections by blocking any TCP packets with the SYN bit set and ACK cleared. Linux iptables firewall command offers a special --syn option to implement it. Xmas scans clear the SYN bit and thus fly right through those rules.
This scan does work against most Unix-based systems.
As we can see in above picture when we send packet with FIN/PSH/URG flag to set and send it to destination if we don't get any response from Destination we will know that Port is OPEN. if we get RST in return then we know that Port is Closed.
ICMP/ARP Scan
ICMP Scan / Ping Sweep
Click here to download the Wireshark capture for the Ping Sweep used above.
ARP Scan
Click here to download the Wireshark capture for the ARP Scan used above.
Signature Detection with Snort
Detecting File Types in Payloads
There are a number of filters which can be used such as:
- PNG: http contains "\x89\x50\x4E\x47"
- PDF: http contains “%PDF”
- GIF: http contains "GIF89a"
These filters can be used to make up Snort rules which may include Perl Compatible Regular Expressions (PCRE) such as:
ARP Spoofing
Enable ARP spoof detection in Snort
DDoS Detection