Hacknetics
  • Hacknetics
  • Active Directory Management
    • How to Join a Windows 11 PC to a Domain
    • Allow RDP in the domain
  • Active Directory AD Attacks
    • Bloodhound
      • Bloodhound Cypher Queries
    • Impacket-install
    • Kerberos cheatsheet
    • Domain Controllers
    • Overpass The Hash/Pass The Key (PTK)
    • Bloodhound Python
    • Rubeus to Ccache
    • Silver Ticket
    • Golden Ticket
    • Abusing GPO Permissions
    • AppLocker Bypasses
    • SharpView Enumeration
    • DonPapi
    • AD Overview
    • Enumerating Forests
    • NOPAC Priv esc
  • buffer-overflows
    • Buffer Overflows
  • c2-frameworks
    • Sliver
    • Powershell Empire
      • IronPython Empire
    • Metasploit
      • Metasploit Basics
      • Custom MSF Resource Scripts
      • Meterpreter Device Survey
      • Paranoid Mode
    • Pwncat-cs
    • Cobalt Strike
    • Dcrat
      • Modules
      • Builder
      • Dcrat AV Evasion
      • C2 Comms
    • FFM Documentation
  • covering-tracks
    • Evading Logging and Monitoring
    • Linux Logging
    • Tor
    • Windows Log Clearing
    • Ghost Writing Binaries
    • Backdoor Linux Commands
  • Data Exfiltration
  • Exploit Development
    • ROP Finding the vulnerable function
    • Useful Tools for Exploit Dev
    • ropeme
    • Obtaining MSFT Patches for Analysis
    • Mutiny Fuzzer
    • GDB
  • file-transfers
    • Transfering Files
  • lateral-movement
    • Pivoting Enumeration
      • Proxychains and FoxyProxy
      • SSH Tunneling and Port Forwarding
      • Plink.exe
      • socat
      • Chisel
      • SShuttle
  • lin-priv-esc
    • Linux Privilege Escalation
    • Bash Jails
    • ssh agent
  • Things I have Pwn'd before
    • Tomcat
    • Jenkins
  • persistence
    • Linux Persistence
    • Windows Persistence
      • Assign Group Memberships
      • Guest Windows Account Persistence
      • WMI Persist With Event Filters
      • SAM SYSTEM Exfil / Pass The Hash
      • Backdoor Executable
      • Special Privileges and Security Descriptors
      • RID Hijacking
      • Task Scheduler
      • Hijacking File Associations
      • Abusing Services
      • Logon Triggered Persistence
      • MSSQL Enabling xp cmdshell
      • Sticky Keys
      • Using Web Shells
  • recon-enumeration
    • Exploit Research
    • Pentesting DNS
    • Pentesting Kerberos
    • Pentesting FTP
    • Pentesting Email
    • Pentesting SMB
    • Pentesting Redis
    • Banner Grabbing
    • Pentesting Rsync
    • Pentesting MsSql
    • Scanning
    • Pentesting SNMP
    • Pentesting NFS
    • Pentesting LDAP
    • Pentesting Finger
    • User Recon
  • resources
    • resources
    • Youtube / Book List
    • CS/Software Engineer Resources
  • shells
    • Shells
    • web-shells
      • PHP Reverse Shell
      • wwwolf's PHP web shell
  • tool-guides
    • Asymmetric File Encrypt and Decrypt
    • Aws Buckets
    • cewl-crunch
    • Creating a Custom Wordlist
    • evil-winrm
    • Git
    • gobuster
    • Hashcat
    • Hydra User Guide
    • John
    • Linux Basics
    • Mimikatz
    • netcat
    • Nmap
    • nuclei
    • PowerView
    • r2
    • Resources
    • tcpdump
    • T-Shark User Guide
    • tmux
    • ssh
    • Vim
    • Wireshark
    • kwp
    • LAPS
    • KeePass KeeThief
    • FileCryptography.psm1
    • Impacket Pastable Commands
    • crackmapexec Pastable Commands
    • feroxbuster
    • NetExec
    • Ligolo-ng
    • gs-netcat
    • Scarecrow
  • Web Path
    • Testing for LFI
    • Testing for RFI
    • Testing for SQL
    • Testing for XSS
    • Authentication Bypass
    • Cmd Injection
    • Javascript Vulnerabilities
    • SSTI
    • Web Servers
    • JWT Tokens
    • Adobe Coldfusion
    • NoSQL Injection
    • vhost Enumeration
  • Wifi/Bluetooth/ZigBee/SDR/SmartCards
    • Wifi Capture Filters
    • Bluetooth Basics
    • Wifi Overview
    • Bettercap Bluetooth / Wifi
    • Aircrack-ng
    • Airdecap-ng
    • Aireplay-ng
    • RTL-SDR Radio
    • Bluetooth Low Energy
    • Smart Cards
    • Airodump-ng Airgraph-ng
    • gqrx
  • Windows
    • powershell-cheatsheet
    • Windows Privlage Escalation
    • Anti-Virus Evasion
    • Windows Registry
    • exploits
      • printspoofer
    • Windows Kernel Vulnerabilities
    • Windows Defender
    • AMSI Bypasses
    • pktmon Packet Capture Windows
    • Powershell Constrained Language Mode
    • Windows Survey
    • Windows Persistence
    • Windows World Writeable Dirs
  • firewalls
    • iptables
    • ufw
    • netsh advfirewall
  • Malware Analysis
    • Malware Analysis Fundamentals
    • Packer Identification by File section names
    • Analyzing Malicious Documents
    • In Depth Malware Analysis
    • Reversing Malicious Code
  • Infrastructure Development
    • SSL Cert Generation
    • Pfsense
      • OpenVPN Server on Pfsense
    • Proxmox OVA Import
  • Python3 Reference
    • Python3 Cheatsheet
    • Regex Python3
  • EDR
    • Velociraptor EDR
  • Host Forensics
    • Windows Host Forensics
    • Windows NT Versions
    • Windows Logs
  • Cloud
    • AWS
  • OSINT
    • Spiderfoot
    • Shodan Dorks
  • Phishing
  • Random
  • Linux
    • awk
    • cut
    • grep
    • sort
    • Cups CVE2024
  • Windows Malware Development
    • Win32 API
    • Processes Threads Handles
      • Message Box Example (Basic)
      • CreateProcess Example (Basic)
  • Golang
  • Mikrotik
    • Implementing a Password Reset Function for Persistent Access in MikroTik RouterOS
    • Cleaner Wrasse
  • Firmware Reversing
Powered by GitBook
On this page
  • Web Servers
  • Nikto
  • Sanity Check
  • DIRB
  • Dirbuster
  • Netcat
  • GoBuster
  • Gobuster Sub-Domain Enumeration
  • Dirsearch
  • WpScan
  • Wordpress Bruteforce
  • BFAC
  • Burp Spider Website

Was this helpful?

Edit on GitHub
  1. Web Path

Web Servers

PreviousSSTINextJWT Tokens

Last updated 10 months ago

Was this helpful?

alt text

Web Servers

  • Two most common Apache, Microsoft IIS

Nikto

nikto -h [target ip/hostname]
nikto -h [target ip/hostname] -p 80,88,443
nikto -h [target ip/hostname -p 80-88
nikto -h [target] -C all
  • Run early, its slow but good

Sanity Check

  • Look at robots.txt

  • Look in the webpage for comments

  • Is the site not rendering right? (check dns /etc/hosts)

DIRB

  • Comes with a default word list

Dirb [url target host]
  • Custom wordlist:

Dirb [url target host] [wordlist]
  • -n will stop the scan on current dir and move to the next

  • -q stops the running scan and saves the current state

  • -r will return the remaining scan statistics

Dirbuster

dirbuster 
  • Wordlist location:

/usr/share/dirbuster/wordlists/
  • To run, set the target to the target url, set the number of threads, select a word list and hit the start button.

  • Much faster because its multi threaded

Netcat

  • We can grab the banner of the web service running on the target host:

nc [target ip] 80
  • Enter this HTTP request on the next line

HEAD / HTTP/1.0
  • To retrieve the top level page on the webserver we can use the following command:

nc [target ip] 80
  • Run this HTTP request

GET / HTTP/1.0

GoBuster

  • Another good web application scanner.

gobuster dir -u http://magic.uploadvulns.thm -w /usr/share/wordlists/dirb/big.txt
  • dir to run it in directory enumeration mode

  • -u followed by the url

  • -w to specify a wordlist

Syntax

  • dir -> Directory/File Brute force mode

  • dns -> DNS brute forcing mode

  • -x -> Flag for extentions to be tested against

  • -w -> Sets a wordlist to be used

  • -U -> Set username for basic authentication (if required by the directory)

  • -P -> Set password for basic authentication

  • -s -> Set the status codes gobuster will recognize as valid

  • -k -> Skip ssl certificate validation

  • -a -> Set a user agent string

  • -H -> Specify and HTTP header

  • -u -> Set the url to brute force

  • /usr/share/wordlists -> Location of the wordlists

Example full syntax

dirb http://10.10.10.10:80/secret/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -X .txt 
  • This command tests the /secret/ directory

  • It specifies to use the wordlist directory-list-2.3-medium.txt

  • With the -x flag it sets gobuster to test for .txt file extensions i.e. admin.txt, secret.txt

Gobuster Sub-Domain Enumeration

gobuster vhost -u http://horizontall.htb -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -t 150
/\/\/\/\/\/\/\/\/\/\/
Found: api-prod.horizontall.htb (Status: 200) [Size: 413]

Dirsearch

  • Full Syntax

dirsearch -u http://10.10.54.223:80/island/2100 -t 16 -r -e ticket -f -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt

WpScan

  • if you have a wordpress server check below URI as if it is enabled, you can get alot of information.

http://10.10.110.100:65000/wordpress/index.php/wp-json/
  • TLDR; The best one liner

wpscan --url http://backdoor.htb --plugins-detection aggressive --detection-mode aggressive -e ap -o loot/wpscan-out
  • Ideal for wordpress sites to find their vulnerable plugins, users, and themes.

  • Default scan runs non intrusive checks which means no accounts will be brute forced and themes and plugins will be enumerated passively.

wpscan --update
wpscan --url [target url]
wpscan --url http://x.x.x.x --enumerate u,p,t
  • Active enumeration

  • p ->scans popular plugins only

  • vt ->scans vulnerable these only

  • at ->scans all themes

  • Full command:

wpscan --url [url] --enumerate [p/vp/ap/t/vt/at]
  • The following command will test a target for all popular plugins:

wpscan --url [url] --enumerate p --plugins-detection aggressive
  • To scan a wordpress installation only for vulnerable plugins we can run the following command:

wpscan --url [url] --enumerate vp --plugins-detection aggressive
  • Scan for all plugins in the WPScan database run the enumerate option with ap:

wpscan --url [url] --enumerate ap --plugins-detection aggressive
  • Enumerating WP users

wpscan --url [target url] --enumerate u 

Wordpress Bruteforce

  • can brute force with wpscan however this tool works great

./wp-brute.py -c -u http://10.10.110.100:65000/wordpress -H X-Forwarded-For -l admin -P /usr/share/seclists/rockyou.txt
[+] Plugin seems to be not installed, or the source IP or username is in whitelist.

./wp-brute.py --exploit --url http://10.10.110.100:65000/wordpress --header X-Forwarded-For --login admin --passwordlist /usr/share/seclists/rockyou.txt --quiet
./wp-brute.py --exploit --url http://10.10.110.100:65000/wordpress --header X-Forwarded-For --login admin --passwordlist ../../10.10.110.100/list.txt

BFAC

  • Advanced backup-file artifacts for testing web applications

  • https://github.com/mazen160/bfac

  • Install

git clone https://github.com/mazen160/bfac
sudo python3 setup.py install
  • Find backup files on the website/application

bfac --url http://$ip/ --level 4
  • If you manage to download a backupfile, grep for users - might be a password as well

Burp Spider Website

  • Set Foxy Proxy to 127.0.0.1 8080 and enable it

  • Turn off intercept

  • Refresh the page you want to spider

  • Navigate to Target/Site Map in Burp Suite

Screenshot 2021-11-15 161926