fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

8.7K
active users

#100daysofyara

0 posts0 participants0 posts today
Karsten Hahn<p>I wrote how to use knowledge about .NET structures and streams for writing .NET Yara signatures. </p><p>E.g. IL code patterns, method signature definitions, GUIDs, compressed length</p><p><a href="https://infosec.exchange/tags/GDATATechblog" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GDATATechblog</span></a> <a href="https://infosec.exchange/tags/100DaysOfYara" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>100DaysOfYara</span></a><br><a href="https://www.gdatasoftware.com/blog/2025/04/38145-yara-signatures-net-malware" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">gdatasoftware.com/blog/2025/04</span><span class="invisible">/38145-yara-signatures-net-malware</span></a></p>
Thomas Roccia :verified:<p>🤓 Since the <a href="https://infosec.exchange/tags/100daysofYARA" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>100daysofYARA</span></a> challenge started, I decided to release my YARA cheat sheet version 2, extracted from my book Visual Threat Intelligence!</p><p>I hope you will find it useful! Have fun 👇</p><p>And if you like this one you might like the full book: <a href="https://store.securitybreak.io/threatintel" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">store.securitybreak.io/threati</span><span class="invisible">ntel</span></a></p><p><a href="https://infosec.exchange/tags/yara" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>yara</span></a> <a href="https://infosec.exchange/tags/malware" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>malware</span></a> <a href="https://infosec.exchange/tags/cheatsheet" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>cheatsheet</span></a> <a href="https://infosec.exchange/tags/book" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>book</span></a></p>
Thomas Roccia :verified:<p>🤩 2024 My Personal Rewind: What a Year!!</p><p>My rewind couldn’t fit into the post, so I wrote a blog!</p><p>Here are some highlights, but I recommend checking out the blog for more details and personal insights! 👇</p><p>🎉 January:<br>I started strong with <a href="https://infosec.exchange/tags/100DaysofYARA" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>100DaysofYARA</span></a>, released YaraToolkit, a tool for all things YARA, and DocYara, a RAG agent for YARA projects. I traveled to DC to present on Threat Intelligence + GenAI at the CTI Summit SANS Institute—one of the top talks of the year!</p><p>💻 February:<br>I presented at Jupyterthon, launched the Juniverse (catalog for InfoSec Jupyter notebooks), and released the ISOON Leak Investigation with GenAI capabilities for exploring leaked data.</p><p>🔬 March:<br>I created the MSTICpy GPT to assist with MSTICpy tasks. I spent a weekend analyzing the XZ Backdoor, creating 2 graphics to explain the threat during chaos, with over 1M views 🌟— it was featured by media, podcasts, and YouTube channels.</p><p>🥇 April:<br>We released the Unprotect Coin to reward top contributors with Jean-Pierre Lesueur and Loïs Marcinkowski 🏴‍☠️</p><p>🎙️ May:<br>I discussed the XZ Backdoor analysis on the Microsoft Threat Intelligence Podcast hosted by Sherrod DeGrippo and appeared on Andre Camillo's youtube channel to talk GenAI + Threat Intelligence.</p><p>🚀 June:<br>I taught the Blue Team Arsenal with Roberto Rodriguez (GenAI + Python for CTI) at x33fcon, amazing feedback! My book, Visual Threat Intelligence, won the Bronze Award 🥉 Foreword Reviews for Technology &amp; Science.</p><p>📚 July:<br>My XZ Backdoor work was featured in PagedOut Zine from Gynvael Coldwind—an honor as a longtime fan of the zine.</p><p>🦾 August:<br>We taught our training at BlackHat and I presented at Defcon about my XZ Backdoor analysis on the War Stories main stage—over 500 attendees (maybe more) in the room! 🤯</p><p>🌟 September:<br>I released FabricUI and I was a finalist for the SANS Difference Maker Award. I also appeared on Yaniv Hoffman YouTube channel to discuss Defcon and Blackhat.</p><p>📖 October:<br>I received my signed copy of Evasive Malware by Kyle Cucci, which I reviewed and was featured in.</p><p>🎨 November:<br>I presented at BSides Gold Coast, Hack.Sydney, and BSides Melbourne, where we introduced a 3D-printing village. I launched the Unprotect Project Scanner with Jean-Pierre Lesueur and joined Ricki Burke for a career cybersecurity webinar. I also published a blog on building a GenAI CTI assistant with MCP, ORKL and Claude.</p><p>🎄 December:<br>I launched the GenAI x SEC Calendar, to share daily, code, experiments and tools for practical GenAI applications in cybersecurity. The feedback was overwhelming!</p><p>Thank you all for your continuous feedback and engagement, please have a look to the blog for all the links! I am also sharing the screenshot of my personal reflexion which couldn't fit in! 🙂</p><p>➡️ Blog: <a href="https://blog.securitybreak.io/2024-personal-rewind-what-a-year-8f2850e2fa0e" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">blog.securitybreak.io/2024-per</span><span class="invisible">sonal-rewind-what-a-year-8f2850e2fa0e</span></a> </p><p><a href="https://infosec.exchange/tags/cybersecurity" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>cybersecurity</span></a> <a href="https://infosec.exchange/tags/infosec" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>infosec</span></a></p>
Thomas Roccia :verified:<p>🎁 GenAI x Sec Advent #17</p><p>We already covered RAG and Agents. Let's talk today about blending both of them! 👇</p><p>Earlier this year, for the <a href="https://infosec.exchange/tags/100DaysOfYARA" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>100DaysOfYARA</span></a> I built YaraToolkit, a website for all things YARA and I also created DocYara. 🤓</p><p>DocYara is a GenAI agent powered by a RAG packed with the YARA documentation and selected blogposts. DocYara can help you in the process of crafting YARA rules, refining it or optimizing it.</p><p>🎉 It's free! You can check it out here on my website: <a href="https://yaratoolkit.securitybreak.io" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">yaratoolkit.securitybreak.io</span><span class="invisible"></span></a></p><p>I'm also dropping the slides from my presentations at <br>@HCKSYD<br> and Bsides Gold Coast where I presented these tools!</p><p>And here’s a friendly reminder: <a href="https://infosec.exchange/tags/100DaysOfYARA" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>100DaysOfYARA</span></a> kicks off in January. Maybe it’s time for me to update DocYara with automatic rule deployments as we already discussed! 😉</p><p>Slides: <a href="https://speakerdeck.com/fr0gger/yara-toolkit" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">speakerdeck.com/fr0gger/yara-t</span><span class="invisible">oolkit</span></a></p><p><a href="https://infosec.exchange/tags/genAI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>genAI</span></a> <a href="https://infosec.exchange/tags/cybersecurity" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>cybersecurity</span></a> <a href="https://infosec.exchange/tags/YARA" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>YARA</span></a> <a href="https://infosec.exchange/tags/malware" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>malware</span></a> <a href="https://infosec.exchange/tags/agents" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>agents</span></a></p>
larsborn<p><a href="https://infosec.exchange/tags/100DaysofYARA" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>100DaysofYARA</span></a></p><p>In search for some inspiration, I scrolled through <a href="https://www.garykessler.net/library/file_sigs.html" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">garykessler.net/library/file_s</span><span class="invisible">igs.html</span></a> and font files piqued my interest. I'll start with a generic rule for the OpenType font format. It is, as one might expect starting with "Open" and all, a registered trademark of Microsoft. This signature matches on the file magic and then puts some sensible boundaries in place that I've observed in font files on my local installation.</p><p>```<br>rule OpenTypeFontFile {<br> meta:<br> description = "Generic signature for the OpenType font format, excludes some unexpected but valid files to reduce false-positive rate"<br> author = "<span class="h-card" translate="no"><a href="https://infosec.exchange/@larsborn" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>larsborn</span></a></span>"<br> date = "2024-03-10"<br> reference = "<a href="https://en.wikipedia.org/wiki/OpenType" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">en.wikipedia.org/wiki/OpenType</span><span class="invisible"></span></a>"<br> example_hash = "09bcc57b0f2b1518758831018922eadb2b3f279b56d13e1ba9aae04c1927a763"</p><p> DaysofYARA = "26/100"<br> condition:<br> uint32be(0) == 0x4f54544f // OTTO<br> and 4 &lt; uint16be(4) and uint16be(4) &lt; 100 // sensible range for table count<br> and uint16be(6) &amp; 0xf == 0 // search range is often divisible by 16<br>}<br>```</p><p><a href="https://github.com/100DaysofYARA/2024/pull/155" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/100DaysofYARA/2024/</span><span class="invisible">pull/155</span></a></p>
Greg Lesnewich<p><a href="https://infosec.exchange/tags/100DaysofYARA" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>100DaysofYARA</span></a> might have gotten missed but Lab52 had a cool report on a new loader for Turla's (TA420 😎) Kazuar family </p><p>lets look for it by honing in on code in the export functions used for thread suspension, loading into mem, and DLL name style</p><p><a href="https://lab52.io/blog/pelmeni-wrapper-new-wrapper-of-kazuar-turla-backdoor/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">lab52.io/blog/pelmeni-wrapper-</span><span class="invisible">new-wrapper-of-kazuar-turla-backdoor/</span></a></p>
larsborn<p><a href="https://infosec.exchange/tags/100DaysofYARA" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>100DaysofYARA</span></a></p><p>Kotlin is a programming language designed to completely interoperate with JAVA and the JVM. It is often used within Android applications and this rule matches on the file name `DebugProbesKt.bin` within an Android application which seems to be characteristic for Kotlin.</p><p>```<br>rule AndroidKotlinDebugProbesKt {<br> meta:<br> description = "Kotlin artifact needed to enable the builtin support for coroutines debugger in IDEA (DebugProbesKt.bin)"<br> author = "<span class="h-card" translate="no"><a href="https://infosec.exchange/@larsborn" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>larsborn</span></a></span>"<br> date = "2024-02-18"<br> reference = "TODO"<br> example_hash = "158a19eb94aa2f3e2f459db69ee10276c73b945dd6c5f8fc223cf2d85e2b5e33"</p><p> DaysofYARA = "25/100"<br> strings:<br> $constant = "kotlin/coroutines/jvm/internal/DebugProbesKt"<br> condition:<br> uint32be(0) == 0xcafebabe<br> and uint16be(6) &amp; 0xff &gt;= 43 // major version<br> and 3 &lt; uint16be(8) and uint16be(8) &lt;= 3000 // sane constant pool count bounds<br> and uint16be(11) == 44 // length of first constant<br> and for all i in ( 1 .. uint16be(11) ) : ( // first constant printable<br> 0x20 &lt;= (uint16be(11 + i) &amp; 0xff) and (uint16be(11 + i) &amp; 0xff) &lt; 127<br> )<br> and $constant at 13<br>}<br>```</p><p><a href="https://github.com/100DaysofYARA/2024/pull/149" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/100DaysofYARA/2024/</span><span class="invisible">pull/149</span></a></p>

#100DaysofYARA

Let's cover more ground in the Android realm: this rule matches on Java .class files while making sure that the constant pool of those files is within sane boundaries. Feel free to negate those checks to find weird .class files instead.

```
rule JavaClass {
meta:
description = "Java class file with a sane constant pool and the first constant being printable"
author = "@larsborn"
date = "2024-02-18"
reference = "en.wikipedia.org/wiki/Java_cla"
example_hash = "158a19eb94aa2f3e2f459db69ee10276c73b945dd6c5f8fc223cf2d85e2b5e33"

DaysofYARA = "24/100"
condition:
uint32be(0) == 0xcafebabe
and uint16be(6) & 0xff >= 43 // major version
and 3 < uint16be(8) and uint16be(8) <= 3000 // sane constant pool count bounds
and 3 < uint16be(11) and uint16be(11) <= 300 // sane first constant length
and for all i in ( 1 .. uint16be(11) ) : ( // first constant printable
0x20 <= (uint16be(11 + i) & 0xff) and (uint16be(11 + i) & 0xff) < 127
)
}
```

github.com/100DaysofYARA/2024/

en.wikipedia.orgJava class file - Wikipedia

#100DaysofYARA

Continuing with the Android theming: those file formats seem to make a point having their own size in the second DWORD. So here we go, a rule that matches on Android resource files (often named `resources.arsc`).

```
rule AndroidResourceArsc {
meta:
description = "Probably an Android resource file (i.e. resources.arsc)"
author = "@larsborn"
date = "2024-02-10"
reference = "androguard.readthedocs.io/en/l"
example_hash = "e81b50d46350e67d4c60e156556e2698a9acbe73b8c2008ca0f8696a3e0e391a"

DaysofYARA = "22/100"
condition:
uint16be(0) == 0x0200 and uint32(4) == filesize
}
```

github.com/100DaysofYARA/2024/

androguard.readthedocs.ioandroguard.core.bytecodes package — Androguard 3.4.0 documentation
Replied in thread

@0x1c Great question!

It’s because `$mz at 0` isn’t very efficient. In the background, that condition causes YARA to first search for *every* single instance of "MZ" in the file. And because that is such a short sequence of bytes, there are likely to be a great number of them. Only after YARA has found ALL "MZ" occurrences, does it evaluate the `at 0` portion of the rule.

In comparison, `uint16be(0) == 0x4D5A` (and other $string-less conditions), evaluate that part of the condition immediately, and are therefore more performant. Which really makes a difference when searching across a huge corpus of samples. Hope this explanation helps!

#100DaysofYARA

Rule that checks the file magic of ZIP files, then inspects the "central directory" to only allow archives with singles files, then retrieves the location of the first (and only) entry in the central directory, and finally checks if it has the bit set for password protection.

While researching (for the n-th time) how ZIP files work, I realized (again) that there doesn't seem to be a canonical way to find the end of directory. Everyone just suggests to "hunt for it" starting at the end of the file.

```
rule SingleFileInPasswordProtectedZip {
meta:
description = "Inspects ZIP-specific data structures to match on archives containing a single encrypted file"
author = "@larsborn"
date = "2024-02-08"
reference = "users.cs.jmu.edu/buchhofp/fore"
example_hash = "8bfc289b12e0900c2e9e9116c54cd7c7f6dad53916ff48620a7d8a6a8ee09564"

DaysofYARA = "17/100"
condition:
uint32be(0) == 0x504b0304 // ZIP magic
and for any i in ( 0 .. 0x100 ) : ( // hunt for end of directory
uint32be(filesize - i) == 0x504b0506 // end of central directory magic
and uint16(filesize - i + 0xa) == 1 // single file
and uint32be(uint32(filesize - i + 0x10)) == 0x504b0102 // file header magic
and uint16(uint32(filesize - i + 0x10) + 8) & 1 == 1 // password protection
)
}
```

github.com/100DaysofYARA/2024/

users.cs.jmu.eduThe structure of a PKZip file

#100DaysofYARA

Many cryptograhic algorithms need some initial values. If you would just use a randomly generated byte sequence for those, folks might accuse you of actually not generating the sequence at random. Instead you could have integrated sort of trapdoor or trick to give you — as the designer of the algorithm — an advantage when attacking it. A nothing-up-my-sleeve number is an "otherwise famouse" sequence of bytes making the above-described scenario much less probable: "Using the first 10 digits of π as constants allow an attacker to predict the pseudo-random numbers generated by the algorithm" said nobody ever.

ANYWAY: here's a rule matching on two nothing-up-my-sleeve strings used in the Salsa20 stream cipher.

```
rule salsa20
{
meta:
description = "Nothing-up-my-sleeve number used in the Salsa20 stream cipher"
author = "@larsborn"
author = "@huettenhain"
date = "2020-08-23"
reference = "en.wikipedia.org/wiki/Salsa20"
example_hash_abcbot = "1fc59a86915eca78dbe0f90c7e0ee3fac6f7e5160c26a04330bf3858f7e5c1f2"
example_hash_egregor = "d893f26330906bedcad2627f41135f0fda65bc4dfe1f4186cd60d4546469b3c3"
example_hash_netwalker = "de04d2402154f676f757cf1380671f396f3fc9f7dbb683d9461edd2718c4e09d"
example_hash_revil = "12d8bfa1aeb557c146b98f069f3456cc8392863a2f4ad938722cd7ca1a773b39"
example_hash_stealth_worker = "f48628472e35ac54f2b0b42583dfa04ae62ae644ba036dad5abf7efc545393c9"
example_hash_xaynnalc = "b277fb8b666f8b5c179ddac940fad90a3e38b23170931e1226dd1676404dbfec"

DaysofYARA = "15/100"
strings:
$ = "expand 32-byte k"
$ = "expand 16-byte k"
condition:
any of them
}
```

github.com/100DaysofYARA/2024/

en.wikipedia.orgSalsa20 - Wikipedia

Had to take a little time out from yara while I was sick. Been trying to catch up & I'm almost there. Here's 19 rules that brings me up to Day 28. Rest to follow. github.com/100DaysofYARA/2024/ Nothing particularly interesting in the rules. Mostly quick detection rules for old & new code families. Mostly spent my time sleeping & doing some RE to make rules to match across samples. Played around with MCRIT too to generate rules across some code families. I THIIIIINK I've tested most of them on VT. YMMV. #100DaysofYARA

GitHubCatching up on time lost by schrodyn · Pull Request #112 · 100DaysofYARA/2024By schrodyn