Analysis of a Cobalt Strike Stager using CyberChef and then supporting findings with specific Python scripts
** Find me at **
Twitter/X - / cyberraiju
Blog - https://www.jaiminton.com/
Mastodon - https://infosec.exchange/@CyberRaiju
** Timestamps **
00:00 - Start
0:06 - Cobalt Strike
0:23 - CyberChef
0:35 - Download sample
0:57 - Extracting configuration
2:30 - Making more robust recipe
3:56 - Finding the Cobalt Strike watermark/license key
4:35 - Getting information with the Cobalt-strike-stager-parser
** Recipe (append to CyberChef URL after recipe=): **
Remove_null_bytes()Register('(%5B%5C%5Cs%5C%5CS%5D*)',true,false,false)Regular_expression('User%20defined','(?%3C%3Dbxor%20)(.*?)(?%3D%5C%5Cn)',true,true,true,false,false,false,'List%20matches')Register('(%5B%5C%5Cs%5C%5CS%5D*)',true,false,false)Find_/_Replace(%7B'option':'Regex','string':'.*'%7D,'$R0',false,false,true,false)Regular_expression('User%20defined','%5B0-9,%5D%7B60,%7D',true,true,false,false,false,false,'List%20matches')From_Decimal('Comma',false)XOR(%7B'option':'Decimal','string':'$R1'%7D,'Standard',false)Strings('Single%20byte',10,'Alphanumeric%20%2B%20punctuation%20(A)',false,false,false)
** Sample: **
https://bazaar.abuse.ch/download/6269...
** Cobalt Strike Stager Parser: **
https://github.com/stairwell-inc/coba...
** Music and SFX: **
Music by Zen_Man from Pixabay
SFX by Pixabay
#cobaltstrike #malwareanalysis