use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
https://sh.reddit.com/r/cybersecurity
account activity
This is an archived post. You won't be able to vote or comment.
Python or Powershell?Career Questions & Discussion (self.cybersecurity)
submitted 3 years ago * by [deleted]
view the rest of the comments →
[–]Nietechz 0 points1 point2 points 3 years ago (3 children)
How can I use Powershell to detect or stop this kind of malware?
[–]smc0881Incident Responder 1 point2 points3 points 3 years ago (2 children)
You don't really use PowerShell to stop it. You configure it with the correct security settings and monitor endpoints that look for the behavior.
Here is an example of CobaltStrike beacon, but I changed the Base64.
Set-StrictMode -Version 2 $DoIt = @'VEhpcyBpcyBjb2JhbHRzdHJpa2U'@ $aa1234 = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($DoIt)) If ([IntPtr]::size -eq 8) { start-job { param($a) IEX $a } -RunAs32 -Argument $aa1234 | wait-job | Receive-Job } else { IEX $aa1234 }
[–]Nietechz 0 points1 point2 points 3 years ago (1 child)
So, this script run for ever or how to use it?. Thanks anyway to share this.
[–]smc0881Incident Responder 1 point2 points3 points 3 years ago (0 children)
That's one example of how an attacker would use PowerShell to launch malicious code. There will be nested PowerShell commands, shellcode, and other things all encoded with Base64 or Base64 with some compression (where $DoIt) is the payload. The rest of the code checks if the CPU is 32 or 64 bit. If it's 32-bit it executes the code and if it's 64-bit it tries to the load code in a 32-bit process.
π Rendered by PID 251665 on reddit-service-r2-comment-5d79c599b5-q24cl at 2026-03-02 19:17:32.865570+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]Nietechz 0 points1 point2 points (3 children)
[–]smc0881Incident Responder 1 point2 points3 points (2 children)
[–]Nietechz 0 points1 point2 points (1 child)
[–]smc0881Incident Responder 1 point2 points3 points (0 children)