If you are reading this blog post via a 3rd party source it is very likely that many parts of it will not render correctly. Please view the post on signalscorps.com for the full interactive viewing experience.
In this post I will continue where I left off in my last post to try and add additional context to the report with external context.
In reality the knowledge graph created during research is the source of many sources. As such in this post I wanted to try an experiment with getting GPT-3 to consider the knowledge it holds to add further context.
I wanted to start with a fairly simple prompt the Turian malware mentioned in the text (there is a fair bit of knowledge about it online that has existed for quite some time).
Here’s the original snippet of text I used for reference:
The first IP (151.248.24[.]251) contains a historical certificate reference to portal-Share.mfa[.]new, which suggests an ambiguous “Ministry of Foreign Affairs (MFA)” nexus. The second is a virtual private server (VPS) owned by The Constant Company. This second IP (158.247.222[.]6) hosted the domain www[.]delldrivers[.]in from July 7, 2022 to Oct. 11, 2022. This domain is associated with a Turian backdoor sample.
A quick note on historical enrichments
OpenAI models are trained on existing data. That data can often be fairly old. For example, the GPT-3 models training data runs up until October 2019.
As such, knowledge and understanding of things post that date might be significantly more limited.
You can still train GPT as you go, for example, I spent a long time manually teaching it how MITRE ATT&CK was structured). However, it takes a large amount of human intervention and reasoning to get to the correct answer.
Pulling in external information to enhance reports
Input:
Can you tell me more about Turian please?
Output:
Sure! Turian is a backdoor malware that has been associated with cyber espionage activity by threat actors believed to be of Chinese origin. This malware has been known to target a wide range of industries, including aerospace, defense, and telecommunications.
The Turian malware is designed to allow remote access to infected systems and to exfiltrate sensitive data. It has been observed to use a variety of techniques to evade detection, including anti-analysis capabilities and the use of legitimate software for lateral movement within a target network.
Overall, Turian is a sophisticated and dangerous malware that poses a significant threat to organizations targeted by Chinese state-sponsored hacking groups. As always, it is important for organizations to maintain robust cybersecurity measures and to stay vigilant against emerging threats in order to minimize the risk of a successful attack.
Review:
Let’s dig into that in more detail…
Input:
What threat actors are known to use Turian malware?
Output:
The Turian malware has been associated with several advanced persistent threat (APT) groups believed to be of Chinese origin. Some of the APT groups that have been known to use Turian in their cyber espionage campaigns include:
- APT10 (also known as Stone Panda or menuPass)
- APT41 (also known as Barium)
- APT15 (also known as Ke3chang)
These groups are believed to be state-sponsored, with links to the Chinese government. They have been known to target a range of industries and organizations around the world, with a particular focus on intellectual property theft and espionage.
Review:
This is all very good information that can be used to enrich our existing STIX 2.1 knowledge graph.
Much of this information already exists in publicly available knowledgebases like MITRE ATT&CK.
Input:
What MITRE ATT&CK tactics or techniques are associated with the report entered in the first message?
Output:
Based on the information provided in the original text, it is difficult to determine the specific MITRE ATT&CK tactics or techniques associated with the report. The text only provides information on indicators of compromise and their relationships, and does not provide information on any observed or reported behaviors or actions.
However, it is possible to speculate on potential tactics or techniques based on the type of malware involved (Turian) and the association with Chinese state-sponsored threat actors. For example, APT10 and APT41 have been known to engage in spearphishing campaigns and use stolen credentials for lateral movement and data exfiltration, while APT15 has been known to use a custom remote access trojan (RAT) for persistence and command-and-control (C2) operations. These activities could potentially be associated with MITRE ATT&CK tactics and techniques such as spearphishing, credential dumping, lateral movement, data exfiltration, and C2 communications. However, without further information or analysis, it is impossible to definitively associate any specific tactics or techniques with the report.
Review:
I like that GPT-3 can see no directly mentioned tactics or techniques in the text, but does use past research to suggest the groups and the techniques observed to provide some guidance.
However Turian is mentioned in the report, and this is a Software Object S0647 in ATT&CK.
Let’s first add this context to the original text.
Input:
Can you please update the original text below to include information about Turian from MITRE ATT&CK?
The first IP (151.248.24[.]251) contains a historical certificate reference to portal-Share.mfa[.]new, which suggests an ambiguous “Ministry of Foreign Affairs (MFA)” nexus. The second is a virtual private server (VPS) owned by The Constant Company. This second IP (158.247.222[.]6) hosted the domain www[.]delldrivers[.]in from July 7, 2022 to Oct. 11, 2022. This domain is associated with a Turian backdoor sample.
Output:
The first IP (151.248.24[.]251) contains a historical certificate reference to portal-Share.mfa[.]new, which suggests an ambiguous “Ministry of Foreign Affairs (MFA)” nexus. The second is a virtual private server (VPS) owned by The Constant Company. This second IP (158.247.222[.]6) hosted the domain www[.]delldrivers[.]in from July 7, 2022 to Oct. 11, 2022. The domain www[.]delldrivers[.]in is associated with a Turian backdoor sample. More information about the Turian backdoor sample is reported by MITRE ATT&CK S0647: Turian.
Review:
A link to the ATT&CK website would be helpful for readers too…
Input:
Can you please provide an inline link to the original text to the MITRE ATT&CK website for S0647 in markdown format please?
Output:
The first IP (151.248.24[.]251) contains a historical certificate reference to portal-Share.mfa[.]new, which suggests an ambiguous “Ministry of Foreign Affairs (MFA)” nexus. The second is a virtual private server (VPS) owned by The Constant Company. This second IP (158.247.222[.]6) hosted the domain www[.]delldrivers[.]in from July 7, 2022 to Oct. 11, 2022. The domain www[.]delldrivers[.]in is associated with a Turian backdoor sample. More information about the Turian backdoor sample is reported by MITRE ATT&CK S0647: Turian.
Review:
It will also be helpful to include the Turian MITRE ATT&CK STIX 2.1 object for Turian into my graph, not the custom one we generated in the last post. First let’s make sure GPT-3 has knowledge of this object
Teaching GPT-3 about MITRE ATT&CK STIX 2.1
Input:
Can you please print the MITRE ATT&CK STIX Malware Object for Turian software?
Output:
Sure! Here’s an example STIX Malware SDO for the Turian malware, including associated MITRE ATT&CK tactics and techniques:
{
"type": "malware",
"id": "malware--f5d40e91-7f63-44fa-aa7b-2f07b3e2da2a",
"created": "2023-03-21T11:30:00.000Z",
"modified": "2023-03-21T11:30:00.000Z",
"name": "Turian",
"labels": [
"trojan"
],
"description": "Turian is a trojan malware associated with Chinese state-sponsored threat actors APT10, APT41, and APT15. It is known to use a backdoor mechanism to provide remote access and control of infected systems, and is often used for persistence and lateral movement.",
"is_family": true,
"malware_types": [
"Remote Access Trojan (RAT)"
],
"aliases": [
"ATM RAT"
],
"operating_system_refs": [
"operating-system--f8b5d6b1-0672-40a1-9dcf-c3e3cf015942"
],
"kill_chain_phases": [
{
"kill_chain_name": "mitre-attack",
"phase_name": "persistence"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "privilege-escalation"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "credential-access"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "defense-evasion"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "discovery"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "collection"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "command-and-control"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "exfiltration"
}
],
"x_mitre_platforms": [
"Windows"
],
"x_mitre_aliases": [
"ATM RAT"
],
"x_mitre_impact_type": [
"Credential Theft",
"Data Exfiltration",
"Lateral Movement",
"Remote Access"
],
"x_mitre_detection": "Network intrusion detection systems and host-based security tools may detect network and system activity associated with Turian. Signature-based detection and behavioral analysis may be effective for detecting known and unknown variants of the malware.",
"x_mitre_version": "1.0",
"x_mitre_contributors": [
"MITRE ATT&CK"
]
}
This example Malware SDO includes information on the name, description, labels, and aliases associated with the Turian malware, as well as its known malware types and operating systems. It also includes information on associated MITRE ATT&CK tactics and techniques, such as persistence, privilege escalation, lateral movement, and command-and-control. Finally, it includes information on how the malware can be detected and its potential impact. Note that some of the specific information included in this example may not be accurate or complete, and further research and analysis would be required to create a fully accurate and comprehensive Malware SDO for Turian
Review:
This response is incorrect. GPT-3 created a well formed STIX 2.1 Object with relevant ATT&CK custom properties (x_mitre_
), however, it is not the same STIX 2.1 object as ATT&CK uses. You can see this by comparing the id
properties.
- GPT-3 Malware ID: malware–f5d40e91-7f63-44fa-aa7b-2f07b3e2da2a
- ATT&CK Malware ID: malware–350f12cf-fd3b-4dad-b323-14b943090df4
I will now manually teach GPT-3 of this error, and how to resolve it.
Input:
That is not what I wanted.
All MITRE ATT&CK STIX objects can be found here: https://github.com/mitre/cti/ .
The MITRE ATT&CK malware STIX 2.1 object for Turian can be found here: https://github.com/mitre/cti/blob/master/enterprise-attack/malware/malware–350f12cf-fd3b-4dad-b323-14b943090df4.json
Please print this object to represent the Turian malware.
Output:
Sure! Here’s the MITRE ATT&CK Malware SDO for Turian:
{
"type": "malware",
"id": "malware--350f12cf-fd3b-4dad-b323-14b943090df4",
"created_by_ref": "identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5",
"created": "2019-07-22T18:00:00.000Z",
"modified": "2022-09-15T12:15:00.000Z",
"name": "Turian",
"labels": [
"malware"
],
"description": "Turian is a remote access trojan (RAT) that is associated with multiple Chinese state-sponsored threat groups, including APT10, APT15, and APT41. It is often delivered through spearphishing emails and is known to use a backdoor mechanism to provide remote access and control of infected systems, as well as to establish persistence and conduct lateral movement. Turian is primarily designed to target Windows-based systems and has been used for cyber espionage and data theft activities.",
"is_family": true,
"malware_types": [
"Remote Access Trojan"
],
"aliases": [
"ATM RAT"
],
"operating_system_refs": [
"operating-system--fb9700b8-cfcb-447f-9c21-2f1a96c290b8"
],
"kill_chain_phases": [
{
"kill_chain_name": "mitre-attack",
"phase_name": "persistence"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "privilege-escalation"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "credential-access"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "defense-evasion"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "discovery"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "collection"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "command-and-control"
},
{
"kill_chain_name": "mitre-attack",
"phase_name": "exfiltration"
}
],
"x_mitre_platforms": [
"Windows"
],
"x_mitre_aliases": [
"ATM RAT"
],
"x_mitre_impact_type": [
"Credential Theft",
"Data Exfiltration",
"Lateral Movement",
"Remote Access"
],
"x_mitre_detection": "Detecting Turian can be challenging because it is often delivered through spearphishing emails, and it uses encryption and obfuscation techniques to evade detection. However, some potential detection methods include monitoring for suspicious network traffic, such as connections to known command-and-control servers or unusual network ports, as well as monitoring for suspicious system activity, such as the creation of new processes or registry keys.",
"x_mitre_version": "1.2",
"x_mitre_contributors": [
"Adam Pennington",
"Bradley Barth"
]
}
Review:
Perfect!
This ATT&CK Malware SDO includes information on the name, aliases, and description of the Turian malware which is much more helpful than the basic Malware object generated previously.
Looking at the Turian software object (S0647) on the ATT&CK website:
You can see ATT&CK associates it with G0135: BackdoorDiplomacy.
Let’s create a bundle with this information…
Input:
Can you please show me a STIX bundle containing:
- the Turian Malware object with the MITRE ATT&CK STIX 2.1 in the previous response ()
- the Intrusion Set STIX 2.1 object Object for G0135: BackdoorDiplomacy and
- the related SRO in the ATT&CK repository linking BackdoorDiplomacy object to the Turian object
All objects should be taken from the ATT&CK repository at https://github.com/mitre/cti
Output:
Note: for the following outputs I will not print the entire text and have concatenated responses where they exceed ChatGPT limits.
Review:
This graph could then be further exploded by including all the ATT&CK techniques associated with BackdoorDiplomacy.
Input:
Can you also please print the MITRE ATT&CK techniques and sub-techniques associated with the MITRE ATT&CK Group BackdoorDiplomacy. These IDs can be obtained here https://attack.mitre.org/groups/G0135/
Output:
Certainly, here is the list of MITRE ATT&CK techniques and sub-techniques associated with BackdoorDiplomacy, along with the corresponding markdown links to the ATT&CK website:
Tactic: Initial Access
- Not Applicable
Tactic: Execution
- T1059.003: Command and Scripting Interpreter: Windows Command Shell
- T1059.004: Command and Scripting Interpreter: Unix Shell
- T1059.006: Command and Scripting Interpreter: Python
- T1027: Obfuscated Files or Information
- T1140: Deobfuscate/Decode Files or Information
- T1071.001: Application Layer Protocol: Web Protocols
- T1001.001: Data Obfuscation: Junk Data
Tactic: Persistence
- T1547.001: Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder
Tactic: Privilege Escalation
- Not Applicable
Tactic: Defense Evasion
- T1036.004: Masquerading: Masquerade Task or Service
Tactic: Credential Access
- Not Applicable
Tactic: Discovery
- T1083: File and Directory Discovery
- T1082: System Information Discovery
- T1120: Peripheral Device Discovery
- T1016: System Network Configuration Discovery
- T1033: System Owner/User Discovery
Tactic: Lateral Movement
- T1105: Ingress Tool Transfer
Tactic: Collection
- T1074.001: Data Staged: Local Data Staging
- T1113: Screen Capture
- T1560.001: Archive Collected Data: Archive via Utility
Tactic: Command and Control
- Not Applicable
I hope this helps!
Review:
Very good!
Now my next aim is to have these printed in the STIX Bundle with relationships to the ATT&CK BackdoorDiplomacy (G0135) Intrusion Set Object from the STIX CTI repository.
Let’s double check GPT-3 understands these.
Input:
Brilliant! Now can you please print all the STIX 2.1 Attack Pattern Object IDs for these techniques and sub-techniques from the ATT&CK repository here https://github.com/mitre/cti ? Add the ID to each bullet point.
Output:
Input:
This is incorrect. You must use the IDs from https://github.com/mitre/cti
For example: T1059.003: Command and Scripting Interpreter: Windows Command Shell has the STIX 2.1 ID:
attack-pattern–d1fcf083-a721-4223-aedf-bf8960798d62
And here is the link to it in the repository for reference: https://github.com/mitre/cti/blob/master/enterprise-attack/attack-pattern/attack-pattern–d1fcf083-a721-4223-aedf-bf8960798d62.json
Please regenerate the previous response with corrections using the method of obtaining IDs that I’ve just explained.
Output:
Review:
Here GPT-3 kept getting confused. When not directly pointed to the object in the MITRE repository, GPT-3 generates a custom ID each time.
For example, it originally printed:
T1059.003: Command and Scripting Interpreter: Windows Command Shell: attack-pattern–7800e8ef-3f3a-42f1-8c4b-99f4a1203f4b
Which was incorrect. When given the correct ID (attack-pattern–d1fcf083-a721-4223-aedf-bf8960798d62) GPT-3 then continues to use this correctly.
However, where GPT-3 has not been explicitly corrected, it prints an incorrect (seemingly custom generated) STIX ID each time. For example:
T1059.004: Command and Scripting Interpreter: Unix Shell: attack-pattern–8a1a5a5f-33d5-4a5b-822e-5d8e8a5a0f52
When in fact the correct ID for T1059.004 is attack-pattern–a9d4b653-6915-42af-98b2-5758c4ceee56.json
Without wanting to list each Attack Pattern ID manually to correct GPT-3, I decided to try one more approach.
Input:
Forget the STIX Attack Pattern IDs already generated.
You can find the correct MITRE ATT&CK IDs for tactics and techniques under the property objects.external_references.external_id
where objects.external_references.external_id
= mitre-attack
in the JSON files in the directory of this repository: https://github.com/mitre/cti/blob/master/enterprise-attack/attack-pattern/
Now can you print all the STIX 2.1 Attack Pattern Object IDs for the techniques and sub-techniques associated with BackdoorDiplomacy listed earlier please using the Attack Pattern JSON objects inside the repository https://github.com/mitre/cti?
Output:
Review:
Sadly this response is still incorrect.
I won’t continue down this rabbit hole, but if I wanted to add all the objects to the existing bundle then I would have to teach GPT-3 each of the Attack Pattern IDs. Once this has been done I imagine GPT-3 would have enough knowledge to add these to the bundle.
Next up: writing intelligence reports using GPT-3
So far I’ve looked at structuring an unstructured piece of text.
In the world of threat intelligence, many analysts consume information from structure threat feeds and then write their own reports from their research of this data.
My next post will look at authoring intelligence reports using the knowledge obtained through existing intelligence.
I’ll also show you how to automate these prompts using the OpenAI API rather than typing them to ChatGPT each time.
Discuss this post

Never miss an update
Sign up to receive new articles in your inbox as they published.