network-wiredService Enum

Port 21 - FTP

# Nmap to find known vulnerability and detailed scan
nmap --script ftp-anon,ftp-bounce,ftp-libopie,ftp-proftpd-backdoor,ftp-vsftpd-backdoor,ftp-vuln-cve2010-4221,tftp-enum -p 21 $ip

# try anonymous login 
username -> anonymous
password ->

# download
Get file.txt

# upload 
put file.txt

#Use binary mode
binary
put file.exe

Port 22 - SSH

Port 25/587/465 - SMTP

Sending Email - (using swaks)

Port 79 - Finger

HTB -> Sunday

Port 88 - Kerberos

Port 110/995 - Pop3

Port 135 - MSRPC

Used to query for information on the machine.

Amazing Artical

https://www.hackingarticles.in/active-directory-enumeration-rpcclient/arrow-up-right

Port 139/445 - SMB

Port 143/993 IMAP

Port 161/162 UDP - SNMP

SNMP -> RCE

Refer for more info -> https://mogwailabs.de/en/blog/2019/10/abusing-linux-snmp-for-rce/arrow-up-right

circle-info

If you have a SNMP community with write permissions on a Linux target, you can archive code execution by abusing the NET-SNMP-EXTEND-MIB extension. snmpwalk -v X -c public $ip NET-SNMP-EXTEND-MIB::nsExtendOutputFull

NET-SNMP-EXTEND-MIB::nsExtendOutputFull."RESET" = STRING: Resetting password of kiero to the default value

Port 389/636/3268/3269 - LDAP

Port 1433 - MSSQL

Details here -> https://book.hacktricks.xyz/network-services-pentesting/pentesting-mssql-microsoft-sql-serverarrow-up-right

Port 3306 - MySQL

Port 3389 - RDP

Port 5432/5433 - PostgreSQL

hacktrick -> https://book.hacktricks.xyz/network-services-pentesting/pentesting-postgresqlarrow-up-right

Port 5985 - WinRM

Port 6379 - Redis

Webdav

Uploading a shell (Authenticated)

Consider a scenario where we have a web application hosted on port 80 with WebDAV enabled. To gain an initial foothold, we can exploit WebDAV by uploading a web shell (e.g., /usr/share/webshells/aspx/cmdasp.aspx) using the Cadaver tool. Once the web shell is uploaded, we can access it by navigating to port 80.

Davtest

DAVTest tests WebDAV enabled servers by uploading test executable files, and then (optionally) uploading files which allow for command execution or other actions directly on the target.

Last updated