添加用户的汇编代码

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.386
.model flat, stdcall
option casemap :none ; case sensitive
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; Include 数据
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
include windows.inc
include user32.inc
include kernel32.inc
include Netapi32.inc

includelib user32.lib
includelib kernel32.lib
includelib Netapi32.lib

.data?
oUserInfo USER_INFO_1<?>
oUser LOCALGROUP_MEMBERS_INFO_3 <?>
dwErr DWORD ?
.data
szUser dw "a","s","m",0
szPass dw "p","a","s","s",0
szAdministrators dw "A","d","m","i","n","i","s","t","r","a","t","o","r","s",0
.code
start:
invoke RtlZeroMemory,addr oUserInfo,sizeof oUserInfo
push offset szUser
pop oUserInfo.usri1_name
push offset szPass
pop oUserInfo.usri1_password
mov oUserInfo.usri1_priv,USER_PRIV_USER
mov oUserInfo.usri1_flags,UF_NORMAL_ACCOUNT
invoke NetUserAdd,NULL, 1,addr oUserInfo,addr dwErr
push oUserInfo.usri1_name
pop oUser.lgrmi3_domainandname
invoke NetLocalGroupAddMembers,NULL,addr szAdministrators,3,addr oUser,1
invoke ExitProcess,0
end start


文章来自: 本站原创
Tags:
评论: 0 | 查看次数: 6258