Hunting Iranian Nation State Spyware
This tutorial will focus on how to use PolySwarm to hunt for samples that potentially related to Iranian Nation State Spyware.
ZDNet published an article on Iran's official COVID-19 tracker application that sends the real time location of installees to the Iranian government.
The article provides only a single IOC - a SHA256 hash (0f73ac8839f153cf0e830554d9b34af2ea90fd6514ed3992b66a96bc9c12bb4b
) we can find on PolySwarm:
- via the CLI (hash search):
polyswarm search hash 0f73ac8839f153cf0e830554d9b34af2ea90fd6514ed3992b66a96bc9c12bb4b
- via the CLI (metadata search using the hash):
polyswarm search metadata 'hash.sha256:"0f73ac8839f153cf0e830554d9b34af2ea90fd6514ed3992b66a96bc9c12bb4b"'
- via the Python library:
query = 'hash.sha256:"0f73ac8839f153cf0e830554d9b34af2ea90fd6514ed3992b66a96bc9c12bb4b"'
results = api.search_by_metadata(query)
for result in results:
print(f"Artifact Attributes: {result.artifact}")
Let's take a look some of the Metadata Attributes from this Artifact:
{
"artifact": {
"created": "2020-03-10T10:16:50.900548+00:00",
"id": "71592690635387748",
"md5": "766e5ecf6b1d86abf401ad9223de857d",
"sha1": "f1271aa0ccf79d16b036bac5320ed4349af69b65",
"sha256": "0f73ac8839f153cf0e830554d9b34af2ea90fd6514ed3992b66a96bc9c12bb4b"
},
...
"strings": {
"domains": [
"V.mr",
"",
"covid-19-e9057.appspot.com",
"p.to",
"II1046766097017-4va56jc12ajt308tpbuge0tc5iqla179.apps.googleusercontent.com",
"b.mc",
"YJ.cz",
"6.om",
"6.gm",
"covid-19-e9057.firebaseio.com"
],
...
}
}
There are several interesting domains extracted by the strings
Tool:
covid-19-e9057.appspot.com
covid-19-e9057.firebaseio.com
It appears as though some portion of the Iranian government's backend for this app is Google's Appspot and Firebase services. This is mildly interesting because Google removed the application from their Play Store.
Next, we conduct a Metadata Search for the unique portion of these domains (covid-19-e9057
) + a wildcard (*
) to find additional Artifacts that contain these strings:
$ polyswarm --fmt sha256 search metadata 'strings.domains:covid-19-e9057*'
This search nets 4 Artifacts, all of which have been identified as malicious by Engines on PolySwarm. 3 of these Artifacts were, of course, not mentioned in the ZDNet article.
Perhaps they have new functionality worth investigating!