Service Enumeration

Enumerating the services on target

FTP

Ports: TCP 20, 21

Check for anonymous logins

Downloading all files from FTP using wget

$ wget -m --no-passive ftp://anonymous:anonymous@SERVER

Connect to FTP using SSL

$ openssl s_client -connect SERVER:21 -starttls ftp

SMB

Ports: TCP 139, 445

Check for anonymous logins

Listing SMB shares

$ smbclient -N -L //SERVER -U="<username>" --password="<password>"

Connecting to a SMB share

$ smbclient //SERVER/notes -U="<username>" --password="<password>"

Connect to an SMB share using RPC

RPC Query
Description

srvinfo

Server information

enumdomains

Enumerate all domains that are deployed in the network

querydominfo

Provides domain, server, and user information of deployed domains

netshareenumall

Enumerates all available shares

netsharegetinfo <SHARE>

Provides information about a specific share

enumdomusers

Enumerates all domain users

queryuser <USER_RID>

Provides information about a specific user

querygroup <GROUP_RID>

Provides information about a group

Brute Forcing Users RID

Or by using samrdump: https://github.com/SecureAuthCorp/impacket/blob/master/examples/samrdump.py

NFS

Ports: TCP/UDP 2049, 111

Show available NFS share

Mounting NFS share

DNS

Port: UDP 53, TCP 53 for zone transfers

Get all record from a DNS server

Zone Transfer

This can be done recursively after discovering more subdomains

Brute force subdomains given a DNS server

This can be done recursively after discovering more subdomains

SMTP

Ports: TCP 25, 465, 587, 2525

SMTP Open Relay Scanning with nmap

SMTP user enumeration

Evolution Mail Client

Once you have credentials for a valid account, install evolution and setup the account to that user

SNMP

Ports: UDP 161

SNMPwalk to enumerate SNMP service

Onesixtyone to brute force string

MySQL

Ports: TCP 3306

Nmap script

MSSQL

Nmap script

Connecting to MSSQL with python

Download the impacket mssql connector https://github.com/SecureAuthCorp/impacket/blob/master/examples/mssqlclient.py

IPMI

Ports: UDP 623

Metasploit Dumping IPMI hashes

hashcat to crack HP iLO ipmi passwords

hashcat to crack generic ipmi passwords

RDP (Windows)

Ports: TCP 3389

Nmap script

Connecting to RDP service

WinRM (Windows)

Ports: TCP 5985, 5986

Nmap script

evil-winrm

https://github.com/Hackplayers/evil-winrm

WMI

Ports: TCP 135

wmiexec

https://github.com/SecureAuthCorp/impacket/blob/master/examples/wmiexec.py

Last updated