Skip to content

added admin permissions + more reliable exiting method #543

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

EshiPizza4all
Copy link

On the systems I tested this script on, admin permissoins were required to change the password. I have updated the skript to use those and since exiting PowerShell running as an administrator does not work, I replaced ALT+F4 with typing in "exit".

On the systems I tested this script on, admin permissoins were required to change the password. I have updated the skript to use those and since exiting PowerShell running as an administrator does not work, I replaced ALT+F4 with typing in "exit".
@hak5peaks
Copy link
Member

As this is a change to anther users payload, it requires the original author review and approve the changes.

@hak5peaks
Copy link
Member

@aleff-github

@hak5peaks hak5peaks added the requires review from author community contributed payload requires review or clarification from the original author label May 29, 2025
@aleff-github
Copy link
Contributor

Hello everyone (@hak5peaks @EshiPizza4all), sorry for the delay.
Great idea, the only thing I would suggest is to combine the penultimate command with exit at the end using concatenation, i.e.:

Before

STRING net user $env:USERNAME 
STRING  NEW_PASSWORD
ENTER
DELAY 1000
STRING exit
ENTER

After

STRING net user $env:USERNAME 
STRING  NEW_PASSWORD; exit

This saves you time and makes you more dynamic and versatile.

@aleff-github
Copy link
Contributor

Another thing I recommend you use is STRINGLN instead of STRING and put the command that inserts the definition on one line. It should work as follows:

DEFINE #NEW_PASSWORD example
...
STRINGLN net user $env:USERNAME #NEW_PASSWORD

This change makes your code easier to read.

@aleff-github
Copy link
Contributor

In addition to these small tips, I want to specify that I don't have a way to test the code at this time, but I like the idea, so if it actually works for me, I'm fine with the change being published.

The only thing is that in other cases we preferred to create a folder named with the version number, for example:

  • Payload Name

    • V1.0 (Version 1.0)
    • V2.0 (Version 2.0)

This way, you keep a history of old versions, which I think is the best thing to do.

The name can contain other information in addition to the version number. For example, you could include your name so that you immediately receive credits based on the version.

I have implemented the original author's suggestions
@aleff-github
Copy link
Contributor

@EshiPizza4all I probably didn't explain myself well. I was thinking of a structure like this (more or less obv...):

  • (directory) Payload Name
    • (directory) V1.0 (Version 1.0)
      • (file) payload.txt
    • (directory) V2.0 (Version 2.0)
      • (file) payload.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires review from author community contributed payload requires review or clarification from the original author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants