|
| 1 | +# Enumerating and Exploiting Common Services: |
1 | 2 |
|
| 3 | +## Active Directory Ports/Services |
| 4 | +``` |
| 5 | +TCP/UDP port 53: DNS |
| 6 | +TCP/UDP port 88: Kerberos authentication |
| 7 | +TCP/UDP port 135: RPC |
| 8 | +TCP/UDP port 137-138: NetBIOS |
| 9 | +TCP/UDP port 389: LDAP |
| 10 | +TCP/UDP port 445-139: SMB |
| 11 | +TCP/UDP port 464: Kerberos password change |
| 12 | +TCP/UDP port 636: LDAP SSL |
| 13 | +TCP/UDP port 3268-3269: LDAP Global catalog / LDAP GC SSL |
| 14 | +``` |
| 15 | + |
| 16 | +## SMB |
| 17 | +> Server Message Block is a communication protocol used to share files, printers, serial ports, and miscellaneous communications between nodes on a network. |
| 18 | +
|
| 19 | +Gathering Information with `enum4linux`: |
| 20 | +``` |
| 21 | +enum4linux <server> |
| 22 | +``` |
| 23 | + |
| 24 | +Listing Shares with `smbclient`: |
| 25 | +``` |
| 26 | +smclient -L //server/ |
| 27 | +``` |
| 28 | + |
| 29 | +Connecting to SMB Using `Null Session`: |
| 30 | +``` |
| 31 | +smbclient -N //server/share |
| 32 | +``` |
| 33 | + |
| 34 | +Enumerate `Null Session` with `netexec`: |
| 35 | +``` |
| 36 | +nxc smb 10.10.10.161 -u '' -p '' |
| 37 | +nxc smb 10.10.10.161 -u '' -p '' --shares |
| 38 | +nxc smb 10.10.10.161 -u '' -p '' --pass-pol |
| 39 | +nxc smb 10.10.10.161 -u '' -p '' --users |
| 40 | +nxc smb 10.10.10.161 -u '' -p '' --groups |
| 41 | +``` |
| 42 | + |
| 43 | +## LDAP |
| 44 | +> The Lightweight Directory Access Protocol is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an Internet Protocol network. |
| 45 | +
|
| 46 | +Getting Usernames from ldap (if its enabled for anonymous) with `ldapsearch`: |
| 47 | +``` |
| 48 | +ldapsearch -x -h <SERVER> -s base namingcontexts |
| 49 | +ldapsearch -x -h <SERVER> -b 'DC=test,DC=LOCAL' -s sub |
| 50 | +``` |
| 51 | + |
| 52 | +**By 0xRar** |
0 commit comments