forked from FuzzySecurity/Sharp-Suite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f930fa
commit 843c1cd
Showing
26 changed files
with
1,767 additions
and
40 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Copyright (c) 2015, FuzzySecurity | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of PowerShell-Suite nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Sharp-Suite | ||
|
||
The king is dead, long live the king. I am starting a new repo with code samples in C#. My heart is still with PowerShell <3, lets face it using in-line C# in PowerShell is a much nicer experience than actually using C#! However, threat emulation has to evolve over time and so does the tooling. | ||
|
||
## Pwn? | ||
|
||
### SwampThing | ||
|
||
SwampThing lets you to spoof process command line args (x32/64). Essentially you create a process in a suspended state, rewrite the PEB, resume and finally revert the PEB. The end result is that logging infrastructure will record the fake command line args instead of the real ones. Think for example about launching a wmic xsl stylesheet for code execution but faking an innocuous wmic command. | ||
|
||
``` | ||
C:\>SwampThing.exe -l C:\Windows\System32\notepad.exe -f C:\aaa.txt -r C:\bbb.txt | ||
/ | ||
:; \ | ||
|l _____ |; | ||
`8o __-~ ~\ d| Swamp | ||
"88p;. -._\_;.oP Thing | ||
`>,% (\ (\./)8" | ||
,;%%%: ./V^^^V' | ||
;;;,-::::::'_::\ ||\ | ||
8888oooooo. :\`^^^/,,~--._ | ||
oo.8888888888:`((( o.ooo888 | ||
`o`88888888b` )) 888b8888 | ||
b`888888888;(.,"888b888\ | ||
.... b`8888888:::::.`8888. | ||
`:::. `:::OOO:::::::.`OO' ; | ||
`. "``::::::''.' ~ b33f ~ | ||
[>] CreateProcess -> Suspended | ||
[+] PE Arch : 64-bit | ||
[+] Process Id : 10568 | ||
[+] PEB Base : 0xA3C2431000 | ||
[+] RTL_USER_PROCESS_PARAMETERS : 0x20DA9760000 | ||
[+] CommandLine : 0x20DA9760070 | ||
[+] UNICODE_STRING |-> Len : 66 | ||
|-> MaxLen : 68 | ||
|-> pBuff : 0x20DA9760658 | ||
[>] Rewrite -> RTL_USER_PROCESS_PARAMETERS | ||
[+] RtlCreateProcessParametersEx : 0xEAADF0 | ||
[+] RemoteAlloc : 0xEA0000 | ||
[+] Size : 1776 | ||
[?] Success, sleeping 500ms.. | ||
[>] Reverting RTL_USER_PROCESS_PARAMETERS | ||
[+] Local UNICODE_STRING : 0xEBC4D0 | ||
[+] Remote UNICODE_STRING.Buffer : 0x20DA9B10000 | ||
[+] pRTL_USER_PROCESS_PARAMETERS : 0x20DA9870FE0 | ||
``` |
Oops, something went wrong.