Skip to content
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

[SMB] Powershell history module rework #449

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Dfte
Copy link
Contributor

@Dfte Dfte commented Oct 12, 2024

Hey @357384n !

As mentionned in your PR, I love this module. This is going to be pretty useful!
However I believe we can remove the powershell_execute part as it raises an unecessary process creation that can be flagged by an EDR.

To replace it, I manually crawl c:\Users and look for powershell history files.

On a second hand, I don't believe it is a good idea to look for specific key words as you can miss quite a lot of informations. Let's say a user types the "net user Administrateur Defte@WF" command, you won't see it.

As such I left the grep option but still print the entire powershell history, see:
image

I also removed redundant key strings such as password and passw when you can already grep for "pass".

Finally, and to be honest, I think we should enforce the export to a file option as I believe a lot of people will spray this module and will want to have an export somewhere.

Let me know what you guys think about that :P

@NeffIsBack NeffIsBack added the enhancement New feature or request label Oct 13, 2024
@357384n
Copy link
Contributor

357384n commented Oct 18, 2024

Hey @Dfte !

As discussed in DM thanks for your update. You're right it's quite more efficient to get files without PS commands.

In my opinion it could be nice to print only the history which is matching with some keywords and download all the content to files which can be analysed later. Can be did after the export with grep too.

In intern pentest if you do it on a large range you can waste a lot of time to scroll up and down but not all the history is interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants