Design
How is the scoring system generally working?
In general
Ask questions like an security analyst would do!
More specific
How can I answer these questions systematically?
Formula
How to weight the factors?
$S_{Total}(t) = \sum\nolimits_{i=1}^{N} S_Q(q_i,t)$
where $S_{Total}(t)$ is the total score of a trace $t$ and $S_Q(q,t)$ the score of a particular question $q$ for trace $t$.
With $i$ iterating over $N=no. of questions$ the total score is the sum of all question scores.
Each question score
$S_Q(q,t)$ depends on three factors:
- The weight of the question $W_Q(q)$
- The data sources evaluation score $S_{D}(t,q)$
- The detection capabilities evaluation score $S_{C}(t,q)$
$S_Q(q,t) = W_Q(q) * S_{D}(t,q) * S_{C}(t,q)$
$W_Q(q)$
The question weight
| $W_{Pre}(q)$
| Precision |
Of the answer |
| $W_{Sec}(q)$
| Security impact
|
If the answer is yes |
| $W_{Fap}(q)$
| False-positive amount |
Expected |
$W_Q(q) = W_{Pre}(q_i)\frac{W_{Sec}(q_i)}{W_{Fap}(q_i)}$
$S_D(t,q)$
Data sources evaluation score
| $S_{Time}(q,d)$ |
Age of information |
If important for question $q$ |
| $S_{Rel}(q,d)$ |
Reliability |
Quality history of $d$ |
| $S_{Con}(q,d)$ |
Information content |
Confirmed information better |
$S_D(t,q) = \max_{k=1}^N \big(\frac{S_{Time}(q_i,d_k)}{\sqrt{(S_{Rel}(q_i,d_k) * S_{Con}(q_i,d_k))}}\big)$
with $N=\text{No. of data sources}$
$S_{C}(t,q)$
Detection capability score
| $S_{Tec}(c,q)$
| Techniques |
Is hacking technique $_{Tec}$ behind $q$ answerable in capability $c$? |
| $S_{Typ}(c,t)$
| Types and formats
|
Is $c$ capabable of capturing traces from same type as $t$? |
| $S_{His}(c,q)$
| Availability of Historically data |
Can we search for it in the past? |
| $S_{Vis}(c,q,t)$
| Visibility |
Placement of the system ($S_{Int}$),
Applied (protocol/port) filters on interface capture ($S_{Ftr}$),
Richness of captured surroundings ($S_{Sur}$),
Additional information ($S_{Adi}$)
|
$S_{C}(t,q)=\max_{p=1}^N \big(\frac{S_{His}(c_p,q_i)}{S_{Tec}(c_p,q_i) * S_{Typ}(c_p,t)} * \underbrace{\frac{\frac{S_{Sur}(c_p,t)}{S_{Adi}(c_p,t)}}{S_{Int}(c_p,q_i) * S_{Ftr}(c_p,q_i,t)}}_{S_{Vis}}\big)$
with $N=\text{No. of detection capabilities}$
our scoring formula
$
S_{Total}(t) = \sum\nolimits_{i=1}^{N} \bigg(\overbrace{W_{Pre}(q_i)\frac{W_{Sec}(q_i)}{W_{Fap}(q_i)}}^{W_Q(q_i)}* \underbrace{\max_{k=1}^N \big(\frac{S_{Time}(q_i,d_k)}{\sqrt{(S_{Rel}(q_i,d_k) * S_{Con}(q_i,d_k))}}\big)}_{S_{D}(t,q_i)} * \\
\underbrace{\max_{p=1}^N \big(\frac{S_{His}(c_p,q_i)}{S_{Tec}(c_p,q_i) * S_{Typ}(c_p,t)} * \frac{\frac{S_{Sur}(c_p,t)}{S_{Adi}(c_p,t)}}{S_{Int}(c_p,q_i) * S_{Ftr}(c_p,q_i,t)}\big)}_{S_{C}(t,q_i)}\bigg)
$
Implementation
How to build a system which can do this autonomously?
Lets see if this works in the
evaluation
IOC
“Indicator of compromise (IOC) — in computer forensics is
an artifact observed on a network or in an operating system that with high confidence indicates a computer intrusion.”
"An artifact
...observed on a network or in an operating system that with high confidence indicates a computer intrusion."
"An artifact...
observed on a network or in an operating system
...that with high confidence indicates a computer intrusion."
#1
The needle needs to be in the haystack.
(Do not forget to take traceability, manipularity and persistance into account!)
"An artifact observed on a network or in an operating system...
that with high confidence
...indicates a computer intrusion."
#2
The minimal confidencedepends on the use-case.
"An artifact observed on a network or in an operating system that with high confidence...
...indicates a computer intrusion."
A computer intrusion
There are dozens of ways to classify them(I will not explain them here)
(And I do not know them all)
Instead :
Simply let us take a look on how an IoC gets born.
ALERT ON APT-IOCWhat happens now?
What if...
185.29.8.211 is a TOR exit node?
The threat-level does not fit!
#3
If an IOC is not threat-specific,we are wasting resources.
C:\Users\peter.mueller\AppData\Temp\weorbwoier.docx
Good IOC?
Better:
C:\Users\%USERNAME%\AppData\Temp\weorbwoier.docx
Better-Better:
%APPDATA%\Temp\weorbwoier.docx
(environment specific values)
C:\Windows\system32\bad.dll
Good IOC?
Better:
C:\Windows\system32\bad.dll
C:\Windows\SysWoW64\bad.dll
(environment specific values: os-specific values)
C:\Windows\system32\QWIEHQIOWEHQ2E3H4IQOWE.dll
Good IOC?
Better?:
C:\Windows\system32\{32-DIGITS_ENTROPY>0.8}.dll
C:\Windows\SysWoW64\{32-DIGITS_ENTROPY>0.8}.dll
(detect auto-generated values)
#4
Try to normalize/generalize system/runtime specific attributes.
Summary
So for now: The best IOC (needle)...
- #1 ...could be [technically found] in my input data.
- #2 ...has the [use-case related confidence] to deal with the hits.
- #3 ...needs to be [threat-specific] to generate the best detection rate on same effort.
- #4 ...has the best [system/runtime independent] verifiability.
| Input |
Malc0de (Domains only) |
| Date |
July 2017 |
| Use-Case |
Rate potential IoC list |
| Detection capabilities |
DNS-Logs / FW-Logs |
| Required confidence level |
Medium (Goal: Alert potential infections in SIEM) |
How to resolve it in the scoring system?
$S_{Total}(t) = \sum\nolimits_{i=1}^{N} S_Q(q_i,t)$
$t=$ 2.5.72.15
$q=$ 'is_well_known_ip'
$S_Q(q,t) = W_Q(q) * S_{D}(t,q) * S_{C}(t,q)$
$W_Q(q)= -50$
$S_{D}(t,q)=\frac{1}{\sqrt{(1 * 3)}}$ (using $ P(q,d)=$$\left\{\begin{array}{@{}ll@{}}
\frac{S_{Time}}{\sqrt{(S_{Rel} * S_{Cre})}}, & \text{if the data source }d \text{ can answer question }q \\
0, & \text{else} \\
\end{array}\right.$)
$S_{C}(t,q)=1$ (using $ P(q,d)=$$\left\{\begin{array}{@{}ll@{}}
1, & \text{if } W_Q(q) < 0 \text{ because neg. scores are important,} \\
& \text{independent from the detection capabilities} \\
1, & \text{if the answer on question } q \text{ is not specific enough} \\
& \text{to do a further scoring on any } c \in C \\
\max_{i=1}^N (S_{AV}(c_i,q) * S_{CC}(c_i,q)), & \text{else}
\end{array}\right.$)
$t=$ 2.5.72.15
$q=$ 'is_well_known_ip'
$S_Q(q,t) = -50 * \frac{1}{\sqrt{(1 * 3)}} * 1) \approx -28.87$
No other question has been answered.
--> FP can be prevented not using negative scored traces.
| Input |
Petya (IPs only) |
| Date |
April/May 2017 |
| Use-Case |
Rate potential IoC list |
| Detection capabilities |
FW-Logs |
| Required confidence level |
High (Goal: Block entire traffic on FW) |
How to resolve it in the scoring system?
$S_{Total}(t) = \sum\nolimits_{i=1}^{N} S_Q(q_i,t)$
$t=$ 80.150.6.143
$q=$ 'is_multihoster'
$S_Q(q,t) = W_Q(q) * S_{D}(t,q) * S_{C}(t,q)$
$W_Q(q)= -40$
$S_{D}(t,q)=\frac{0.9}{\sqrt{(1 * 2)}}$ (using $ P(q,d)=$$\left\{\begin{array}{@{}ll@{}}
\frac{S_{Time}}{\sqrt{(S_{Rel} * S_{Cre})}}, & \text{if the data source }d \text{ can answer question }q \\
0, & \text{else} \\
\end{array}\right.$)
$S_{C}(t,q)=1$ (using $ P(q,d)=$$\left\{\begin{array}{@{}ll@{}}
1, & \text{if } W_Q(q) < 0 \text{ because neg. scores are important,} \\
& \text{independent from the detection capabilities} \\
1, & \text{if the answer on question } q \text{ is not specific enough} \\
& \text{to do a further scoring on any } c \in C \\
\max_{i=1}^N (S_{AV}(c_i,q) * S_{CC}(c_i,q)), & \text{else}
\end{array}\right.$)
$t=$ 80.150.6.143
$q=$ 'is_multihoster'
$S_Q(q,t) = -40 * \frac{0.9}{\sqrt{(1 * 2)}} * 1) \approx -25.46$
And the other questions?
Remember the TOR exit node 185.29.8.211?
There are two more of it inside.
-
HBGary found several infected systems and lists
119.167.225.38
119.167.225.44
123.183.210.26
as C2 infrastructure of targeted malware called
msomsysdm
-
PWC/BAE now attributed them to chinese APT-10
$S_Q(q,t) = W_Q(q) * S_{D}(t,q) * S_{C}(t,q)$
1. Question weight $W_Q(q)$
2. The data sources evaluation score $S_{D}(t,q)$
$S_{D}(t,q)=$$\left\{\begin{array}{@{}ll@{}}
P(q,D), & \text{if an answer exists using data sources } D \\
0, & \text{else}\\
\end{array}\right.$
$P(q,D)$ expresses the probability for a correct answer.
Due to the fact that $D$ is a set of data sources (
$D=$$\{d_1,d_2...\}$),
the probability $P(q,D)$ is defined* as $\max_{i=1}^N P(q,d_i)$ for each $d \in D$
*There will be a bonus in case multiple sources match.
Each data source $d$ answers with probability $P(q,d)$ question $q$:
$ P(q,d)=$$\left\{\begin{array}{@{}ll@{}}
\frac{S_{Time}}{\sqrt{(S_{Rel} * S_{Cre})}}, & \text{if the data source }d \text{ can answer question }q \\
0, & \text{else} \\
\end{array}\right.$
where
$\frac{S_{Time}}{\sqrt{(S_{Rel} * f(S_{Cre}))}}$ is defined as
-
Time-Score $S_{Time}$ $[0.0,0.1,...,1.0]$
- In time-critical cases: "The older the answer, the lower the score"
- Otherwise: $1$
- Reliability-Score $S_{Rel}$ $\in \{1,2,...,6\}$
- Credibility-Score* $S_{Cre}$ $\in \{A,B,...,F\}$ with $f:i \mapsto{y} \text{ where } (i,y) \in \{(A,6),(B,5)...(F,1)\}$