Skip to content

Instantly share code, notes, and snippets.

@shellcromancer
Created January 9, 2022 05:05
Show Gist options
  • Select an option

  • Save shellcromancer/59b0a9a044f7413b009962f64663f819 to your computer and use it in GitHub Desktop.

Select an option

Save shellcromancer/59b0a9a044f7413b009962f64663f819 to your computer and use it in GitHub Desktop.
Identify spaces in either a segment or section name of a Mach-o.
import "macho"
rule macho_space_in_segment_or_section {
meta:
descrption = "Identify spaces in either a segment or section name of a Mach-o."
author = "@shellcromancer <root@shellcromancer.io>"
version = "0.1"
date = "2022-01-08"
condition:
for any segment in macho.segments: (
segment.segname contains " " or
for any section in segment.sections: (
section.sectname contains " "
)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment