This will detect a lot of software that utilizes the network in some way or another using the Berkeley Sockets API.
Programs using this API should have at least a call to socket
and at least two of the additional functions listed within this rule.
This should work on PE, ELF, and Mach-O files as well as some scripting languages.
rule sockets
{
meta:
description = "Berkeley Sockets API"
reference = "https://en.wikipedia.org/wiki/Berkeley_sockets"
author = "Daniel Roberson"
strings:
$socket = "socket" fullword
$ = "accept" fullword
$ = "bind" fullword
$ = "getsockname" fullword
$ = "listen" fullword
$ = "close" fullword
condition:
$socket and 2 of them
}
Pingback: YARA Rules Index – DMFR SECURITY
Pingback: Week 01 – 2022 – This Week In 4n6