githubEdit

HTTP/HTTPS

Port 80 , 8080, 443:

When executing Nmap, you may discover HTTP ports like 80, 81, 8080, 8000, 443, etc. There's a possibility of finding four HTTP ports on one machine.

In the very first step, run Nmap with an aggressive scan on all ports:

nmap -sC -sV -A -T4 -Pn -p80,81,8000,8080,443 192.168.146.101

Simply copy the version name of the website and search on Google to find an exploit.

Furthermore, Nmap reveals some files such as robots.txt, index.html, index.php, login.php, cgi-sys, cgi-mod, and cgi-bin.

If you encounter a host error, find a hostname with port 53 or discover a name in the website source code, footer, contact us, etc.

Then add that discovered domain in the /etc/hosts file to access the site.

Content Discovery

gobuster dir -u http://192.168.10.10 -w /wd/directory-list-2.3-big.txt (simple run)

gobuster dir -u http://192.168.10.10:8000 -w /wd/directory-list-2.3-big.txt (with different port)

gobuster dir -u http://192.168.10.10/noman -w /wd/directory-list-2.3-big.txt (if you find noman then enumerate noman directory)

With the help of content discovery, you will find hidden directories, CMS web logins, files, etc. This is a crucial step in OSCP+.

Utilizing content discovery and Nmap, you can identify CMS, static pages, dynamic websites, and important files like databases, .txt, .pdf, etc. Additionally, you can enumerate websites with automated tools such as WPScan, JoomScan, Burp Suite, and uncover web vulnerabilities like RCE, SQLi, upload functionality, XSS, etc.

If you find any CMS like WordPress, Joomla, etc., simply search on Google for default credentials or exploits of theme, plugin, version etc. In the case of a login page, you can exploit SQL injection and launch a brute-force attack with Hydra. If you identify any CMS, scan it with tools, perform enumeration with brute force, check default usernames and passwords, explore themes, plugins, version exploits, and search on Google. Alternatively, you can discover web vulnerabilities to gain initial access.

Wordpress

Drupal

find version

Adobe Cold Fusion

Check version

fckeditor Version 8 LFI

Elastix

Google the vulnerabilities

default login are

able to upload shell in profile-photo

Joomla

Admin page

Configuration files

Mambo

Login Page

Try common credentials such as admin/admin, admin/password and falafel/falafel.

Determine if you can enumerate usernames based on a verbose error message.

Manually test for SQL injection. If it requires a more complex SQL injection, run SQLMap on it.

If all fails, run hydra to brute force credentials.

View source code

Use default password

Brute force directory first (s’’ometime you don't need to login to pwn the machine)

Search credential by bruteforce directory

bruteforce credential

Search credential in other service port

Enumeration for the credential

Register first

SQL injection

XSS can be used to get the admin cookie

Bruteforce session cookie

SQLi

Pentestmonkey cheatsheet

Try

Try

Use UNION SELECT null,null,.. instead of 1,2,.. to avoid type conversion errors

For mssql,

xp_cmdshell

Use concat for listing 2 or more column data in one

For mysql,

try a' or 1='1 -- -

File Upload

Change mime type

Add image headers

Add payload in exiftool comment and name file as file.php.png

1)

2)

3)

use automated tool

Git

Download .git

Extract .git content

LFI and RFI

IF LFI FOUND then start with

SSH keys are

By default, SSH searches for id_rsa, id_ecdsa, id_ecdsa_sk, id_ed25519, id_ed25519_sk, and id_dsa

with encode

SSL Enumeration

Last updated