New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added cmd useradd payload #18002
Added cmd useradd payload #18002
Conversation
An additional optional advanced option to choose user groups would be nice too. A common sudo configuration is to permit all users in the The pam_wheel PAM plugin allows only users in the |
Great idea! Got any tips on how? If experience has over corrected on anything, its to not trust the executables on the system. |
Also, I'm getting errors with rubocop, but no corrections being suggested. I feel like its the description, but I dont know what I should do to fix it since its just breaking rubocop |
So with all of this, are we good to land? Or what else are we missing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rad10 for this payload module! I left a couple of comments for you to review before it lands.
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
Thanks @rad10 for updating this. Everything looks good to me now. I tested with a generic exploit module and verified the user was created with sudo access. I'll go ahead and land it.
|
Release NotesThis adds a command payload module that creates a new privileged user on a *nix target system. |
This is a very simple payload (One that I am surprised isnt already implemented because its so simple yet so useful) that creates a new user on the target system.
Verification
List the steps needed to make sure this thing works
set payload cmd/unix/useradd
set USER <username>
set PASS <password>
set SUDOERS true
exploit/linux/local/su_login
set SESSION <ID>
set PASSWORD <password>
post/multi/manage/sudo
set SESSION <ID>
set PASSWORD <password>