# Dapato password stealer

**URL:** <https://community.emergingthreats.net/t/dapato-password-stealer/206>\
**Category:** Rule Signatures\
**Created:** [December 14, 2022, 1:21pm UTC](https://community.emergingthreats.net/t/dapato-password-stealer/206 "2022-12-14T13:21:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoahWolf](https://avatars.discourse-cdn.com/v4/letter/n/a6a055/32.png) [@NoahWolf](https://community.emergingthreats.net/u/NoahWolf)\
**Post date:** [December 14, 2022, 1:21pm UTC](https://community.emergingthreats.net/t/dapato-password-stealer/206/1 "2022-12-14T13:21:13Z")

</div>

Tried to incorporate the previous feedback; however, it wasn’t working for this signature. Here’s my notes:

Content modifiers for the URI and HTTP method did not work in this signature, nor did the http keyword. Given the lack of spacing in the User-Agent and Content-Type fields after the “:”, the problems with the content modifiers, and Suricata’s HTTP keyword not parsing the traffic, it leads me to believe the malware author wrote this network connection stream by themselves and not with an HTTP-conforming library. Could be wrong, but I had so much trouble with HTTP-related inspection on this, that is my only guess.

alert tcp $HOME\_NET any → $EXTERNAL\_NET any (msg:“Dapato password stealer”; content:“POST”; content:“/info/step”; content:“info=”; reference:url,[VirusTotal](https://www.virustotal.com/gui/file/5630ac19f4074c8781a1cdd1e6c44ccf37e9634e45290e1e9ffa9a0e457cc887/detection); sid:2008002; rev:1;)

---

<div class="post-metadata">

**Author:** ![ishaughnessy](https://sea2.discourse-cdn.com/flex016/user_avatar/community.emergingthreats.net/ishaughnessy/32/491_2.png) [@ishaughnessy](https://community.emergingthreats.net/u/ishaughnessy)\
**Post date:** [December 15, 2022, 1:17am UTC](https://community.emergingthreats.net/t/dapato-password-stealer/206/2 "2022-12-15T01:17:32Z")

</div>

Hey Noah,

Thanks for sharing the new sample! I took a look at this and see what you mean regarding the missing spaces. Just for reference, this is the detonation I’m looking at [Tria.ge Analysis](https://tria.ge/221215-aatzpaed2y/behavioral1)

 ![Screenshot 2022-12-14 at 17.14.32](https://us1.discourse-cdn.com/flex016/uploads/emergingthreats/original/1X/3b60ca4bd3ab8107829f20171c8f2412aaa78d50.png)

Do you mind sharing your http signature and pcap you are testing with? With this run from Tria.ge I was able to get a rule working using the URI/Method Buffers. I noticed that on your previous post it looks like your signature was formatted for Suricata 4 which may be an issue depending on how you are testing.

Suricata 4/5 use buffers in a slightly different ways. Suri 4 uses _ **content modifiers** _ that look back in the rule. For example, this signature uses the http\_uri content modifier format to match “index.php” in the uri.

`alert http any any -> any any (content:"index.php"; http_uri; sid:1;)`

Suricata 5 uses sticky buffers which places the buffer name first, and all keywords following it apply to that buffer. This is that same rule written using the http.uri sticky buffer:

`alert http any any -> any any (http.uri; content:"index.php"; sid:1;)`

One thing to note that when using sticky buffers, a lot of the underscores `_` have been replaced with periods `.`

for example:  
`http_uri` has become `http.uri`

The Suricata documentation has a [helpful table](https://suricata.readthedocs.io/en/suricata-6.0.9/rules/http-keywords.html#http-keywords) which correlates the legacy buffers with their sticky buffer equivalents.

 ![Screenshot 2022-12-14 at 17.56.53](https://us1.discourse-cdn.com/flex016/uploads/emergingthreats/original/1X/1cb5568d664006e6fee794b0365e23030ea58dde.png)

Here is your signature in the sticky buffers and content modifiers format.

Suricata 5 using sticky buffers:  
`alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"Dapato password stealer"; http.method; content:"POST"; http.uri; content:"/info/step"; http.request_body; content:"info="; sid:1; rev:1;) `

Suricata 4 using content modifiers:  
`alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"Dapato password stealer"; content:"POST"; http_method; content:"/info/step"; http_uri; content:"info="; http_client_body; sid:1; rev:1;) `

Sticky buffers can be hard to get the hang of, especially if you’ve worked with older versions of Suricata or Snort!

Edited to add:  
Brandon Murphy on our team has great writeup on this malware which is worth checking out. The malware is also known as CopperStealer. Here’s a link [https://www.proofpoint.com/us/blog/threat-insight/now-you-see-it-now-you-dont-copperstealer-performs-widespread-theft](https://www.proofpoint.com/us/blog/threat-insight/now-you-see-it-now-you-dont-copperstealer-performs-widespread-theft)

---

<div class="post-metadata">

**Author:** ![NoahWolf](https://avatars.discourse-cdn.com/v4/letter/n/a6a055/32.png) [@NoahWolf](https://community.emergingthreats.net/u/NoahWolf)\
**Post date:** [December 15, 2022, 1:23pm UTC](https://community.emergingthreats.net/t/dapato-password-stealer/206/3 "2022-12-15T13:23:22Z")

</div>

The version of Suricata I am running is 6.0.4. I tried to upload the pcap but it says new user can’t attach anything. I had the signature how it should have been with http, but it wouldn’t work. I kept modifying it until it did work, so I no longer have the http signature. The original http signature was basically your Suricata 4 signature, without the http\_client\_body. Thank you for your feedback. I’ll give it another go to get sticky buffers to start working.
