当前位置: 首页 > article >正文

[笔记] 关于CreateProcessWithLogonW函数创建进程

函数介绍

https://learn.microsoft.com/zh-cn/windows/win32/api/winbase/nf-winbase-createprocesswithlogonw

BOOL CreateProcessWithLogonW(
  [in]                LPCWSTR               lpUsername,
  [in, optional]      LPCWSTR               lpDomain,
  [in]                LPCWSTR               lpPassword,
  [in]                DWORD                 dwLogonFlags,
  [in, optional]      LPCWSTR               lpApplicationName,
  [in, out, optional] LPWSTR                lpCommandLine,
  [in]                DWORD                 dwCreationFlags,
  [in, optional]      LPVOID                lpEnvironment,
  [in, optional]      LPCWSTR               lpCurrentDirectory,
  [in]                LPSTARTUPINFOW        lpStartupInfo,
  [out]               LPPROCESS_INFORMATION lpProcessInformation
);

几种使用方法

使用存在的账号信息创建进程

在这里插入图片描述

使用空网络账号信息创建进程

在这里插入图片描述
所以即使账号信息实际不存在也可以创建进程,只是无权访问网络资源

if (!CreateProcessWithLogonW(L"MalseclogonUser", L"MalseclogonDomain", L"MalseclogonPwd", LOGON_NETCREDENTIALS_ONLY, NULL, cmdline, 0, NULL, NULL, &startInfo, &procInfo)) {
	printf("CreateProcessWithLogonW() failed with error code %d \n", GetLastError());
} else {
	// the returned handles in procInfo are wrong and duped into the spoofed parent process, so we can't close handles or wait for process end.
	printf("Spoofed process %S created correctly as child of PID %d using CreateProcessWithLogonW()!", cmdline, pid);
}

http://www.kler.cn/news/365145.html

相关文章:

  • SSH 的 N 大黑科技玩法
  • Vivado自定义IP修改顶层后Port and Interface不更新解决方案
  • sql-labs靶场第二十关测试报告
  • 设计模式---模版模式
  • 面试题:JVM(一)
  • C2W4.LAB.Word_Embedding.Part2
  • Linux系统
  • 鸿蒙到底是不是纯血?到底能不能走向世界?
  • 蓝桥杯题目理解
  • Python爬虫:urllib_ajax的get请求豆瓣电影前十页(08)
  • 【C++】用哈希桶模拟实现unordered_set和unordered_map
  • 网络安全中的日志审计:为何至关重要?
  • 35.第二阶段x86游戏实战2-C++遍历技能
  • CPRI与eCPRI的区别
  • 每天5分钟玩转C#/.NET之C#语言详细介绍
  • python-PyQt项目实战案例:制作一个视频播放器
  • 双十一送你一份购物攻略,绿联NAS DXP2800评测
  • 借老系统重构我给jpa写了个mybatis风格的查询模块
  • 【笔记】apt源设置为阿里云源
  • 19.面试算法-树的深度优先遍历(一)
  • Nginx15-Lua扩展模块
  • Zookeeper面试整理-Zookeeper集群管理
  • 简单走近ChatGPT
  • 信息安全工程师(55)网络安全漏洞概述
  • 解决 PHP 上传数据超时 504 错误:
  • 为微信小程序换皮肤之配置vant