FuzzBunch之payload—Regdelete复现(win7)

FuzzBunch资源:https://github.com/misterch0c/shadowbroker,从GitHub上下载下来解压为

我要复现的是windows的工具—windows文件夹下payloads子文件夹下的工具Regdelete

exe作为插件,通过FuzzBunch框架调用运行,具体可以参见这篇博客:https://blog.csdn.net/yiyiiyiy/article/details/78627053

FuzzBunch框架配置好之后,按win+R快捷键,输入cmd进入命令行,比如我按照上面博客会把shadowbroker-master直接复制到C盘,那么进入到C:\shadowbroker-master\windows路径下(cd C:\shadowbroker-master\windows),输入fb.py,应该出现下图:

第一次进入应该会让你新建一个项目,随便取个名字就行。设置你要攻击的ip,以及回显的ip(一般就是攻击机)

要使用Regdelete工具,输入命令use Regdelete;出现下图

接下来有一些值需要设置,Value列有值的可以不用管,没有值的就需要自己设置了,下面分别来看

1)RegKey:The registry key containing the entity to be deleted,去翻译一下,意思是:包含要删除的实体的注册表项;首先,我们来看一下注册表大致是个什么样子,还是win+R快捷键输入regedit,显示注册表

windows将其分了不同组:HKEY_CLASSROOT,HKEY_CURRENT_USER,HKEY_LOCAL_MACHINE,HKEY_USER,HKEY_CURRENT_CONFIG,具体更改哪个组下的注册表项在后面确定,这里要确定的是组下面要更改的注册表项,比如说我要更改HKEY_LOCAL_MACHINE下的SOFTWARE注册表项,那么我就要把RegKey的值设置为53004f004600540057004100520045005c00,是不是没反应过来怎么就把RegKey设置为一串完全看上去没关系的数字;是这样的,这一串数字其实是SOFTWARE的另一种表示,转换过程如下:

就是将字符串SOFTWARE转换为16进制数,再转换成Unicode格式,即在每个字节之后添加0x00,所以就变成了上面的53004f004600540057004100520045005c00,如果你想更改其他的注册表项,对其他的字符串做同样的处理过程即可!

2)EntityToDelete:大概是说要删除的实体,由于我的靶机就是攻击机,为了保护系统,我这里自己在SOFTWARE新建一个值

新建的字符串值命名为test

那么和设置RegKey一样,EntityToDelete设置为7400650073007400;

3)RegHive:包含要删除的键或值的注册表单元格,这里我们选择HKLM,代表HKEY_LOCAL_MACHINE

4)TypeToDelete:我们要删除的是一个值,因此选择value

5)CredentialType:凭证类型,一般我们选择第二种方式—PasswordHash,具体的你要看一下关于windows下密码Hash的介绍:https://xz.aliyun.com/t/1943;以我设置的密码375942为例,它对应的Hash值为ee191056999df6358f94af3a8ec0a27c

6)UserName:靶机的用户名,同样地,用户名Administrator转换为16进制数,再转换为Unicode格式;

7)Credential:凭证

以我设置的密码375942为例,它作为字符串转换为16进制数,然后转换为Unicode格式,然后计算MD4值,如下图:

计算出Hash值为ee191056999df6358f94af3a8ec0a27c;

最后会显示一下我们设置的值

然后,执行此payload,在执行之前,要确保靶机开启远程注册表服务,可按如下设置打开:win+R快捷键,输入secpol.msc,打开本地安全策略

进入安全设置—>本地策略—>安全选项

编辑右边的可远程访问的注册表路径

因为我们要编辑SOFTWARE,因此要把SOFTWARE加入可远程访问的注册表路径中,两个路径都要设置

还有允许注册表可被远程修改,win+R快捷键输入services.msc

将Remote Registry修改为自动启动,并且将其启动

右键,属性进行修改,然后再右键,点启动

这样就可以来执行Regdelete了,执行成功的效果如下

我们可以再打开注册表编辑器看一下,SOFTWARE下的test确实被删除了

自己编写的很强悍的删除系统垃圾批处理工具: @echo off color 02 echo ::清理局域网共享痕迹--注册表:: reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\WorkgroupCrawler\Shares" /f >nul 2>nul echo ::用户运行或操作历史记录--注册表:: reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\Folder" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.txt" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.rar" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.mp3" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.jpg" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.ini" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.bmp" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.doc" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.eip" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.htm" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.ico" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.inf" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.gif" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.wav" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.xls" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.rm" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedMRU" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\*" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\mp3" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\rm" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\wav" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\bat" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\exe" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\eip" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\ico" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\htm" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\jpg" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{5E6AB780-7743-11CF-A12B-00AA004AE837}\Count" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{75048700-EF1F-11D0-9888-006097DEACF9}\Count" /va /f >nul 2>nul reg delete "HKCU\Software\WinRAR\ArcHistory" /va /f >nul 2>nul reg delete "HKCU\Software\WinRAR\DialogEditHistory\ArcName" /va /f >nul 2>nul reg delete "HKCU\Software\WinRAR\DialogEditHistory\ExtrPath" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\MediaPlayer\Player\RecentFileList" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Microsoft Management Console\Recent File List" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Office\11.0\PowerPoint\Recent File List" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Office\11.0\Excel\Recent File" /va /f >nul 2>nul reg delete "HKCU\Software\Microsoft\Office\11.0\Word\Data" /v "Settings" /f >nul 2>nul reg delete "HKCU\Software\VMware, Inc." /va /f >nul 2>nul echo ::清理IE浏览历史的下拉列表--注册表:: reg delete "HKCU\Software\Microsoft\Internet Explorer\TypedUrls" /va /f >nul 2>nul echo ::清理系统垃圾文件:: del /f /q "%ALLUSERSPROFILE%\Documents\DrWatson\*.*">nul 2>nul del /f /q "%USERPROFILE%\Application Data\Microsoft\Office\Recent\*.lnk">nul 2>nul del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del /f /s /q %systemdrive%\*.log del /f /s /q %systemdrive%\*.gid del /f /s /q %systemdrive%\*.chk del /f /s /q %systemdrive%\*.old del /f /s /q %USERPROFILE%\Local Settings\Temp\*.* del /f /s /q %systemdrive%\recycled\*.* del /f /s /q %windir%\*.bak del /f /q %userprofile%\cookies\*.* del /f /q %userprofile%\recent\*.* del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" del /f /s /q "%userprofile%\Local Settings\Temp\*.*" del /f /s /q "%userprofile%\recent\*.*" del /f /s /q %windir%\system32\dllcache\*.* DEL /F /s /q %windir%\temp\*.* del /f /s /q %windir%\prefetch\*.* del /f /s /q %windir%\*.log echo sfc /purgecache '清理系统盘无用文件 echo defrag %systemdrive% -b '优化预读信息 exit 将以上代码存为.bat文件即可。 建议大家手动删一下这些目录下的垃圾文件: C:\WINDOWS\system32\dllcache C:\WINDOWS\Prefetch C:\WINDOWS\Temp C:\Documents and Settings\%userfile%\Cookies C:\Documents and Settings\Administrator\Local Settings\Temp C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files C:\Documents and Settings\Administrator\Recent 还有windows目录下所有蓝色的以$符号开头结尾的系统更新垃圾! 当然,你要开启查看隐藏文件才行,
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值