mylamour / blog

Your internal mediocrity is the moment when you lost the faith of being excellent. Just do it.
https://fz.cool
61 stars 14 forks source link

CMD And PowerShell #7

Open mylamour opened 6 years ago

mylamour commented 6 years ago

最近写了一些Powershell脚本,然后列出一些CMDPowerShell作为比较。使用PowerShell进行渗透的话,github上有许多不错的资源。

Windows Cmd


* NETSH
>
```cmd
netsh wlan show profile

* FSUTIL
> `fsutil fsinfo drives`
* QPROCESS
* WEVTUTIL
* WUSA
* QUERY
* TASKLIST
* AT (SCHTASKS)
* [RUNDLL32](http://www.thewindowsclub.com/rundll32-shortcut-commands-windows)
* MSTSC

## [Windows环境变量](http://www.cnblogs.com/valuel/archive/2010/04/01/1702434.html)

* %HOMEDRIVE% 
* %HOMEPATH%    
%HOMESHARE%
* %USERPROFILE%
* %SYSTEMDRIVE%
* %SystemRoot%
* %SESSIONNAME%
* %WINDIR% 
* %USERNAME% 

## [File]
* %SYSTEMDRIVE%\boot.ini 
* %WINDIR%\win.ini 
* %SYSTEMROOT%\repair\SAM 
* %SYSTEMROOT%\System32\config\RegBack\SAM 
* %SYSTEMROOT%\repair\system 
* %SYSTEMROOT%\System32\config\RegBack\system
* %SYSTEMDRIVE%\autoexec.bat 
* 
> 
```cmd
type yourfilepath 
tree C:\ /f /a > C:\output_of_tree.txt
dir /b /s [Directory or Filename] 
dir \ /s /b | find /I “searchstring” 
sspring commented 6 years ago

cmd命令补充:

  1. set命令枚举所有已经环境变量
  2. telnet测试端口是否开放
mylamour commented 6 years ago