Wesley Shields's Avatar

Wesley Shields

@wxs.bsky.social

Working at Google TAG. Retired FreeBSD committer. May or may not be a robot.

711 Followers  |  51 Following  |  204 Posts  |  Joined: 19.08.2023
Posts Following

Posts by Wesley Shields (@wxs.bsky.social)

Preview
Threats to the Defense Industrial Base | Google Cloud Blog The defense sector faces a relentless barrage of operations conducted by state-sponsored actors and criminal groups.

Some of the analysis I've done over the past few years is referenced in various places in this overview. I might be most happy that my sneaky reference to the time a half-dozen of us ate a Vermonster in a single attempt made it into the report. cloud.google.com/blog/topics/...

11.02.2026 19:14 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Haha! My son and I were just saying how this has been an insanely boring first half.

09.02.2026 01:40 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Release v1.13.0 Β· VirusTotal/yara-x Add crx and dex modules to Python invoke API (#534). Add Python API for specifying the metadata that should be passed to modules (6bebe34): Output filenames that needs reformatting when using yr fm...

github.com/VirusTotal/y... - Once again, new release with some good bug fixes and nice improvements.

06.02.2026 21:06 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Preview
Release v1.12.0 Β· VirusTotal/yara-x Improvements in the parser to produce better Concrete Syntax Trees (#531, c46b3bd). BUGFIX: avoid panic when parsing some regular expressions (136ab9f).

YARA-X 1.12.0 is out. Some small bug fixes but still worth upgrading! Once again, congrats to Victor and the contributors as the project keeps getting better.

github.com/VirusTotal/y...

26.01.2026 13:33 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Release v1.11.0 Β· VirusTotal/yara-x Make the parser stricter (#502). Implement dex module (#458). Implement C api console log (#515). Implement permhash for the crx module (#510). Implement the imports() method for the Rules object i...

github.com/VirusTotal/y... - 1.11.0 is out! Lots of new features, modules and bug fixes. Read the release notes and congrats to Victor and the contributors!

09.01.2026 13:43 β€” πŸ‘ 7    πŸ” 3    πŸ’¬ 0    πŸ“Œ 0
Preview
a man and a woman are standing next to each other and the woman is wearing a skeleton tank top . ALT: a man and a woman are standing next to each other and the woman is wearing a skeleton tank top .

I like that the rage amount is a constant 11 for a single laptop or a fleet of them.

26.12.2025 20:32 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Yeah, could be done.

24.12.2025 21:07 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

To do what? Have the ability to write JS UDF?

24.12.2025 19:37 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
a close up of a man 's face in a car with a woman behind him . ALT: a close up of a man 's face in a car with a woman behind him .
24.12.2025 19:27 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image Post image Post image Post image

One wheel Jesus was at the Christmas parade again. All praise be to one wheel Jesus and his crew.

13.12.2025 23:52 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I’m not judging (I am) but pantscon5 is the ideal situation.

Also, using this scale to describe level of formality for meetings at work (I already use it for non-work) is on my OKRs.

10.12.2025 12:00 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Please describe your requirement for the level of fancy using the pantscon scale: pantscon5.com

10.12.2025 11:23 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
feat: More constraints on hashes by wxsBSD Β· Pull Request #509 Β· VirusTotal/yara-x The imphash implementation always returns a lowercase md5. This commit switches the type of the returned value so that it can be used to generate warnings. Warnings are now generated if you use an ...

Quality of life improvement for yara-x:

I realized the functions that output hash values do not have constraints on them like the hash module functions do. See virustotal.github.io/yara-x/blog/... for details on why this is useful to extend everywhere.

PR that fixes it: github.com/VirusTotal/y...

09.12.2025 21:16 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Preview
Release v1.10.0 Β· VirusTotal/yara-x New yr fix warnings command (#493). Generate more efficient WASM code for some expressions, reducing the size of compiled rules (5efc214, a865681). Improve the API for traversing the AST in DFS ord...

Yara-x 1.10.0 released today! It can now automatically fix some warnings, and some improvements in code generation. This is another great step forward for the project.

github.com/VirusTotal/y...

20.11.2025 18:33 β€” πŸ‘ 7    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0

Yeah, same basic idea between us. Mine was the first thing that popped into my head with no actual optimizations to avoid β€œcounting” - great minds think alike!

14.11.2025 22:07 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

That will "count" printable bytes starting at "offset" and going for at most 100 bytes or until it hits a non-printable. I can easily make it stop at just a 0x00 if you really want.

14.11.2025 21:46 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Do you want it to output ONLY the length? Is "counting" acceptable? If so:

import "console"

rule a {
condition:
with offset = 0: (
for all i in (0..100): (
with b = uint8(offset + i): (
b >= 0x20 and b <= 0x7e and console.log(i)
)
)
)
}

14.11.2025 21:46 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Don't ask why but you may now refer to me as "Sir Wesley, robot, esq." (thanks @gabagool.ing for that one) and gemini thinks this is what I look like. It may have had some help with the Pikachu hoodie and hot dogs. You're welcome for this visual.

14.11.2025 21:10 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Please do! Would love to know how it works for you!

14.11.2025 21:08 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Finally put this up for review in a PR (github.com/VirusTotal/y...) - it's now in it's own command and has been tested on some pretty gnarly graphs of rules. If you have huge dependency graphs the output gets messy, but it works well otherwise.

14.11.2025 20:37 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0
Preview
GitHub - wxsBSD/yara-x at deps Experimenting with YARA and Rust. Contribute to wxsBSD/yara-x development by creating an account on GitHub.

If you're interested in my dependency querying code for yara rules check out my deps branch: github.com/wxsBSD/yara-...

You can build it with "cargo build --features=debug-cmd" and use it like "yr debug deps -h". My TODO list for this is basically:

- Write tests

- Move to it's own command

09.11.2025 20:43 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 1

@pdub5.bsky.social does great work! If you’re going to be at the conference go see his talk and maybe heckle him for me.

05.11.2025 22:01 β€” πŸ‘ 9    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

Once I get this landed upstream I'd like to expose this in the python bindings as it's the easiest language for people to walk an AST and find the things they are interested in, but that may take a bit. For now, I think just having an option to see output in JSON or graphviz is fine.

04.11.2025 03:12 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Second, it also lets you have a system that will include only the necessary import statements for those exported rules. Duplicate import statements are only a warning in yara-x (and just silently ignored in C yara) but it's still nice to use what you import rather than just importing everything.

04.11.2025 03:12 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

First it lets you find dependencies in large rule sets. Imagine you have 10k rules and you want to share one specific one but it depends upon another rule, so you have to include that other rule in your export. This lets you identify only the minimum necessary rules easily.

04.11.2025 03:12 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

As you can see, it correctly knows when to ignore things that might look like a module usage (pe identifier) when it is used in a with declaration or a for variable.

Why is this useful you might ask? Well, it lets you do two things...

04.11.2025 03:12 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

wxs@mbp yara-x % cat rules/test.yara
rule a { condition: with pe = 1 + 1: (pe == time.now()) }
rule b { condition: a }
wxs@mbp yara-x % ./target/debug/yr debug deps rules/test.yara
Deps: {"a": [], "b": ["a"]}
Modules: {"a": ["time"]}
wxs@mbp yara-x %

04.11.2025 03:12 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I've got something built on Victor's new DFSIter for yara-x AST that takes a set of rules and outputs the dependencies and modules used (based upon the compiled list of modules). Ultimately I want to make it output a graphviz file for visualization but for now it's dumping them to stdout...

04.11.2025 03:12 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0
Preview
Release v1.9.0 Β· VirusTotal/yara-x Add function for scanning files by path to the C and Go APIs (32bac10). Add version number to the Rust API (bdb53e8, #469). Add osabi field to elf module (afa0960). Avoid verifying patterns when th...

yara-x 1.9.0 is out! The DFSIterator for AST traversal is what I was finishing up this week (and now I don’t have to, yay), and is definitely really interesting if you are into that sort of thing. I’ll finish my work onto top of this new implementation.

github.com/VirusTotal/y...

03.11.2025 13:26 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Expose modules and rule dependencies after compilation Β· Issue #484 Β· VirusTotal/yara-x We have a large set of rules and want to export only the necessary subset of them for a given rule, but we currently have no easy way of determining which modules or rules dependencies need to be e...

github.com/VirusTotal/y... - I have an implementation done, at least enough to put up next week. ;)

02.11.2025 22:11 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0