Programmatically create an administrative user under Windows
Programmatically create an administrative user under Windows
Programmatically creates a 'local admin' Windows user. Requires admin rights. The created user is hardcoded to the following:
Login: audit
Password: Test123456789! (this should be good enough to fit most password policies)
This standalone piece code can run in many contexts:
rundll32.exe adduser.dll,CreateAdminUser@16. This is useful to bypass mandatory code signing applied to EXE files only.i686-w64-mingw32-gcc -oadduser32.exe adduser.c -lnetapi32i686-w64-mingw32-gcc -shared -oadduser32.dll adduser.c -lnetapi32x86_64-w64-mingw32-gcc -oadduser64.exe adduser.c -lnetapi32x86_64-w64-mingw32-gcc -shared -oadduser64.dll adduser.c -lnetapi32cl.exe adduser.c /link /DEFAULTLIB:ADVAPI32 /DEFAULTLIB:NETAPI32cl.exe adduser.c /LD /link /DEFAULTLIB:ADVAPI32 /DEFAULTLIB:NETAPI32No open issues yet, or sync has not completed.