|
| 1 | +The `smb_lookupsid` module bruteforces the SID of the user, to obtain the username or group name. |
| 2 | +This module works against Windows and Samba. |
| 3 | +This module can also be used to lookup the information against a Domain utilizing the `action` option. |
| 4 | +SID 500 is always the default administrator account, while user accounts start in the 1000 range. |
| 5 | + |
| 6 | +## Vulnerable Application |
| 7 | + |
| 8 | +To use `smb_lookupsid`, make sure you are able to connect to a SMB service that supports SMBv1. |
| 9 | + |
| 10 | +## Verification Steps |
| 11 | + |
| 12 | +1. Do: ```use auxiliary/scanner/smb/smb_lookupsid``` |
| 13 | +2. Do: ```set rhosts [IP]``` |
| 14 | +3. Do: ```run``` |
| 15 | + |
| 16 | +## Scenarios |
| 17 | + |
| 18 | +### Windows 2000 SP4 |
| 19 | + |
| 20 | +``` |
| 21 | +msf > use auxiliary/scanner/smb/smb_lookupsid |
| 22 | +msf auxiliary(smb_lookupsid) > set rhosts 192.168.2.127 |
| 23 | +rhosts => 192.168.2.127 |
| 24 | +
|
| 25 | +[*] 192.168.2.127:445 - PIPE(LSARPC) LOCAL(WIN2K - 5-21-484763869-823518204-682003330) DOMAIN(RAGEGROUP - ) |
| 26 | +[*] 192.168.2.127:445 - USER=renamedAdministrator RID=500 |
| 27 | +[*] 192.168.2.127:445 - USER=Guest RID=501 |
| 28 | +[*] 192.168.2.127:445 - GROUP=None RID=513 |
| 29 | +[*] 192.168.2.127:445 - USER=disabled RID=1000 |
| 30 | +[*] 192.168.2.127:445 - USER=test RID=1001 |
| 31 | +[*] 192.168.2.127:445 - WIN2K [renamedAdministrator, Guest, disabled, test ] |
| 32 | +[*] Scanned 1 of 1 hosts (100% complete) |
| 33 | +[*] Auxiliary module execution completed |
| 34 | +``` |
| 35 | + |
| 36 | +### Metasploitable2 (Samba) |
| 37 | + |
| 38 | +``` |
| 39 | +msf auxiliary(smb_lookupsid) > run |
| 40 | +
|
| 41 | +[*] Scanned 26 of 253 hosts (10% complete) |
| 42 | +[*] 192.168.2.35:139 - PIPE(LSARPC) LOCAL(METASPLOITABLE - 5-21-1042354039-2475377354-766472396) DOMAIN(WORKGROUP - ) |
| 43 | +[*] 192.168.2.35:139 - USER=Administrator RID=500 |
| 44 | +[*] 192.168.2.35:139 - USER=nobody RID=501 |
| 45 | +[*] 192.168.2.35:139 - GROUP=Domain Admins RID=512 |
| 46 | +[*] 192.168.2.35:139 - GROUP=Domain Users RID=513 |
| 47 | +[*] 192.168.2.35:139 - GROUP=Domain Guests RID=514 |
| 48 | +[*] 192.168.2.35:139 - USER=root RID=1000 |
| 49 | +[*] 192.168.2.35:139 - GROUP=root RID=1001 |
| 50 | +[*] 192.168.2.35:139 - USER=daemon RID=1002 |
| 51 | +[*] 192.168.2.35:139 - GROUP=daemon RID=1003 |
| 52 | +[*] 192.168.2.35:139 - USER=bin RID=1004 |
| 53 | +[*] 192.168.2.35:139 - GROUP=bin RID=1005 |
| 54 | +[*] 192.168.2.35:139 - USER=sys RID=1006 |
| 55 | +[*] 192.168.2.35:139 - GROUP=sys RID=1007 |
| 56 | +``` |
| 57 | +...snip... |
| 58 | + |
| 59 | +``` |
| 60 | +[*] 192.168.2.35:139 - USER=user RID=3002 |
| 61 | +[*] 192.168.2.35:139 - GROUP=user RID=3003 |
| 62 | +[*] 192.168.2.35:139 - USER=service RID=3004 |
| 63 | +[*] 192.168.2.35:139 - GROUP=service RID=3005 |
| 64 | +[*] 192.168.2.35:139 - METASPLOITABLE [Administrator, nobody, root, daemon, bin, sys, sync, games, man, lp, mail, news, uucp, proxy, www-data, backup, list, irc, gnats, libuuid, dhcp, syslog, klog, sshd, bind, postfix, ftp, postgres, mysql, tomcat55, distccd, telnetd, proftpd, statd, msfadmin, user, service ] |
| 65 | +``` |
0 commit comments