• Name:
• Version:
telnet INSERTIPADDRESS 110
USER pelle@INSERTIPADDRESS
PASS admin
or:
USER pelle
PASS admin
# List all emails
list
# Retrieve email number 5, for example
retr 5
Port 111 - Rpcbind
rpcinfo -p INSERTIPADDRESS
Port 123-NTP
ntp-info and ntp-monlist
Check ntpd version for exploits
nmap -vv -sV -sU -Pn -p 161,162 --script=snmp-netstat,snmp-processes INSERTIPADDRESS
snmp-check -t INSERTIPADDRESS -c public
# Common community strings
public
private
community
Port 1433 - MSSQL
SQL shell from Kali
sqsh -S IPADDRESS -U sa
>SELECT * from Table;
>GO
Useful MSSQL Commands
Version
SELECT @@version
Comments
SELECT 1 — comment
SELECT /*comment*/1
Current User
SELECT user_name();
SELECT system_user;
SELECT user;
SELECT loginame FROM master..sysprocesses WHERE spid = @@SPID
List Users
SELECT name FROM master..syslogins;
List Databases
SELECT name FROM master.dbo.sysdatabases;
List Tables
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE';
List Tables for specific database
SELECT TABLE_NAME FROM <DATABASE_NAME>.INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE';
Port 1521 - Oracle
• Name:
• Version:
• Password protected:
tnscmd10g version -h INSERTIPADDRESS
tnscmd10g status -h INSERTIPADDRESS
Port 2049 - NFS
showmount -e INSERTIPADDRESS
If you find anything you can mount it like this:
mount INSERTIPADDRESS:/ /tmp/NFS
mount -t INSERTIPADDRESS:/ /tmp/NFS
show databases;
SELECT schema_name FROM information_schema.schemata; — for MySQL >= v5.0
List Columns
SELECT table_schema, table_name, column_name FROM information_schema.columns WHERE table_schema != 'mysql' AND table_schema != 'information_schema';
List Tables
show tables;
SELECT table_schema,table_name FROM information_schema.tables WHERE table_schema != 'mysql' AND table_schema != 'information_schema';
List Stored Procedures
SHOW PROCEDURE STATUS;
SELECT name from mysql.proc;
Check for FILE privilege which allows users to access or create files on the system
SELECT user,file_priv FROM mysql.user WHERE FILE_PRIV='Y';
Port 3389 - Remote desktop
Test logging in to see what OS is running
rdesktop -u guest -p guest INSERTIPADDRESS -g 94%
# Brute force
ncrack -u administrator -P /usr/share/wordlists/rockyou.txt -p 3389 IPADDRESS