ãã®èšäºã¯ãSysmon ThreatAnalysisã·ãªãŒãºã®3çªç®ã§æåŸã®èšäºã§ããã·ãªãŒãºã®ä»ã®ãã¹ãŠã®ããŒãïŒ
ããŒã1.Sysmonãã°åæã®æŠèŠ
ããŒã2.Sysmonã€ãã³ãããŒã¿ã䜿çšããè åšã®æ€åº
ããŒã3.ã°ã©ãã䜿çšããé«åºŠãªSysmonè åšåæïŒããã«ãããŸãïŒ
Sysmonã€ãã³ãããŒã¿ã䜿çšããéæšæºãµãã°ã©ãã®æ€çŽ¢ïŒç°¡åãªäŸïŒ
æœåšçãªè åšã瀺ããµãã°ã©ãã®ç°åžžãç¹å®ããäŸãèŠãåã«ïŒãããŠããããã®èšèãããªãã®ãªã¿ã¯ãç®èŠããããªããªããäœãããªããç®èŠããããŸããïŒïŒãå°ããªéžè±ãããŸãããã
ãã®æç¹ã§ãèŠåãçºè¡ããå¿ èŠããããŸãããã®æçš¿ã¯ãGitHubã®ã³ãŒããšãšãã«ããšã³ã¿ãŒãã©ã€ãºã°ã¬ãŒãã®ãœãªã¥ãŒã·ã§ã³ã眮ãæããããšã¯ã§ããŸãããããã¯ã§ããå°ããªèŠæš¡ã§ã®è åšãèå¥ããã®ã«åœ¹ç«ã¡ãŸãããç§ã®é«è²Žãªäœ¿åœã¯ãITã»ãã¥ãªãã£ã®å°é家ãç解ããçŸå®äžçã®è åšä¿è·ãœãªã¥ãŒã·ã§ã³ãéè³ã§ããããã«ããããšã§ãããããŠããããéæãã1ã€ã®æ¹æ³ã¯ãïŒç§ã®å©ããåããŠïŒç¬èªã®ãœãªã¥ãŒã·ã§ã³ãèªåã§äœæããããšã§ãã
èªå® ã§ã®å®éšã¯ãDIYè åšæ€åºãœãããŠã§ã¢ã®ã¹ã±ãŒãªã³ã°ãããã«é£ããããç解ããã®ã«åœ¹ç«ã¡ãŸããããã°ããŒã¿ã»ãããšããã«é¢é£ãããã¹ãŠã®ãã®ãåŠçããå¿ èŠããããŸããã¯ãªãŒãã³ã°ïŒéåžžã«é£ããã¿ã¹ã¯ïŒãå¹ççãªåŠçïŒå¿ èŠãªããŒã¿æ§é ãã¢ã«ãŽãªãºã ãªã©ã®æ€çŽ¢ïŒãããã³èª€æ€ç¥ã®æ°ãå°ãªãçµæã®æäŸã«ãããåãååãæ³ã§ããªãã«ç»ãããšã¯ãããŸããã§ãããããã念é ã«çœ®ããŠãè åšãæ€åºããããã®æ¢æã®ãœãªã¥ãŒã·ã§ã³ãæ€èšã§ããŸã...ãã ããäžé£ã®èšäºãå®äºããç¬èªã®å®éšãè¡ã£ãåŸã§ã®ã¿ã§ãã
ã°ã©ãã®éã¿ã®èšå®
ãã«ãŠã§ã¢ã®çœ²åã« äŸåããªãè åšé²åŸ¡ãœãªã¥ãŒã·ã§ã³ãæ§ç¯ããç°¡åãªæ¹æ³ã®1ã€ã¯ãåã®ããŒãã®è åšã°ã©ãã䜿çšããããšã§ãã
ãã®ãããªã°ã©ãã¯ãSysmonã€ãã³ããã°ã®ãšã³ããªã«åºã¥ããŠããã»ã¹ããŒããæ¥ç¶ããŸãã
泚æïŒåããã»ã¹éå§ã€ãã³ãïŒSysmonã€ãã³ãã®ã€ãã³ãID 1ïŒãåå¥ã®ããŒãã«åå²ããŸããã§ããã代ããã«ãPowerShellé ç¹ã«ã¯ãä»»æã®ãŠãŒã¶ãŒã®äžããèµ·åããã¢ããªã±ãŒã·ã§ã³ãžã®ãªã³ã¯ã1ã€ããããšã瀺ããããæœè±¡çãªã°ã©ããäœæããŸããã1ã€ã¯Excelçšããã1ã€ã¯ãã©ãŠã¶ãŒçšãªã©ã§ãã
Sysmonè åšã°ã©ãã®PSQuickGraphããªãŒãã¥ãŒã cmd.exeã®äžã®ç°åžžãªãã©ã³ãã«æ³šæããŠãã ããã
ãã ããå®è¡äžã®ããã»ã¹ã®é »åºŠã远跡ããå¿ èŠããããŸããããšãã°ãPowerShellãå€ãWindowsãšãã£ã¿ãNotepad.exeãã®ãwhoamiãã1åãš10åèµ·åããå ŽåãPowerShellã®é ç¹ããã®ã°ã©ãã®ç«¯ã¯ããããã1ãš10ã®å¯Ÿå¿ãããéã¿ãã§ããŒã¯ããå¿ èŠããããŸããããã¯è«ççã§ããïŒ
æãåçŽãªè åšæ€åºã¢ã«ãŽãªãºã ã®å€ãã§ã¯ããã®éã¿ãã°ã©ãã®é åãæ¯èŒããããã®ã¡ããªãã¯ã«ãªããŸããéèŠãªç¹ã¯ãå šäœã®å¹³åééãšæ¯èŒããŠå¹³åééãäœããµãã°ã©ããçããããšããããšã§ãã
ããã§ã¯ãããŸãããïŒãã£ãã«èšªããªããµãããã¯ç°åžžãŸãŒã³ã§ãããããã£ãŠãæœåšçãªè åšã®åæã«ããããŠãŒã¶ãŒã¢ã¯ã·ã§ã³ããã£ãã«äœ¿çšãããªããµãã°ã©ãã«åããå Žåã¯ãã¢ã©ãŒã ã¬ãã«ãé»è²ã«äžããå¿ èŠããããŸãã
ç§ã説æããã¢ãããŒããšä»¥äžã®PowerShellã¹ã¯ãªããã¯ã倧èŠæš¡ãªã€ã³ãã©ã¹ãã©ã¯ãã£ã®å®çšçãªç®çã§äœ¿çšããããšãç®çãšãããã®ã§ã¯ãããŸããããã ããåã ã®ãµãŒããŒã®å Žåããœãªã¥ãŒã·ã§ã³ã¯æ©èœããŠããå¯èœæ§ããããŸãããŸãã¯ãå°ãªããšãã䜿çšããŠããäŒæ¥ãœãªã¥ãŒã·ã§ã³ã®ç¬ç«ããæ€èšŒãæäŸããŠããå¯èœæ§ããããŸããããŒã¿æ§é ã«å¯ŸããDougFinkeã®PowerShellã¢ã«ãŽãªãºã ã¯ãåªãã匷åãªããŒã«ã§ãã
ãšè¿°ã¹ãŸãããïŒåœŒã®ä»äºããªããã°ãç§ã¯ç°åžžã°ã©ããããžã§ã¯ãã§äœãéæã§ããªãã£ãã§ããããããäžåºŠããããšãããã°ïŒ
圌ã®çŸããã°ã©ãé¢æ°ã®PowerShellã©ã€ãã©ãªã®å©ããåããŠããããæ°æ¬ã®PSç·ã§Sysmonè åšã°ã©ãã®éã¿ãç°¡åã«èšç®ã§ããã°ã©ãå šäœã®å¹³åé ç¹éã¿ãèŠã€ããããšãã§ããŸããã°ã©ãããã©ããŒã¹ãããšãã«ãã³ãŒãã¯åé ç¹ã«ãã¹ãŠã®åºåãšããžã®éã¿ãå²ãåœãŠãŸãã
$AW=0 #average weight
$GW=0 #total weight
$mset = [System.Collections.ArrayList]@() #master set of subraphs
#calculate total weight by summing up the frequencies or weights of the edges
foreach ($e in $g.getAllEdges() ) {
$GW = $GW + $e.weight
}
write-host "Weight of Graph: " $GW
$AW = $GW / $g.vertices.count
write-host "Average weight per vertex: " $AW
#assign weight of edges to vertice
for ($i=0; $i -lt $g.vertices.count; $i++) {
$w=0
$v=$g.vertices[$i]
foreach($e in $v.getEdges()) {
if($e -eq $null) {continue}
$w=$w + $e.weight
}
$v.value.Weight = $w
}
äžèšã®ã³ãŒãã¯ãå¿ èŠãªèšç®ãè¡ããŸãããã®å Žåãåé ç¹ã¯ãçºä¿¡ãšããžã«å¿ããŠã蚪åã®é »åºŠãšèŠãªãããšãã§ããŸãã
PowerShellç°åžžã°ã©ãã¹ã¯ãªããã®æãé£ããéšåïŒåŸã§èª¬æããŸãïŒã¯ãçºçããå¯èœæ§ãæãäœãã°ã©ãã®é åãèŠã€ããããããå«ãæ倧ã®ãµãã°ã©ããèŠã€ããããšã§ãããã®ã¿ã¹ã¯ãå®äºããã«ã¯ãå€ãã³ã³ãã¥ãŒã¿ãŒãµã€ãšã³ã¹ã®æ¬ããããå¿ èŠããããããããŸãããããããå®éã«æžãã®ã¯ããã»ã©é£ããããšã§ã¯ãããŸããïŒ
ã°ã©ãã«ã¯ãåé ç¹ã«ã¢ã¯ã»ã¹ããé ç¹ã®å¹³åéã¿ã«å¿ããŠãµãã°ã©ããç¹å®ã®ãããå€ã«éãããŸã§ãé£æ¥ããé ç¹ãç ç²ã«ããŠã°ã©ããæ¡åŒµãããšãããåŸæ¥ã®å¹ åªå æ€çŽ¢ã䜿çšããŸããããã®ãããªïŒ
function extend-subgraph($v, $t) {
$vertexQueue = New-Object Queue
#initialize
$vertexQueue.enqueue($v)
$h=$v.value.Weight
$s=@() #subgraph
$s+=$v
$extend=$false
while (!$vertexQueue.isEmpty()) { #bfs
$currentVertex = $vertexQueue.dequeue()
$es= $currentVertex.getEdges()
foreach($e in $es) {
$ev= $e.endVertex
if ((($h + $ev.value.Weight)/($s.count+1) -lt $th) {
#extend the sub-graph
$s+=$ev
$h =$h + $ev.value.weight
#queue it up
$vertexQueue.enqueue($ev)
}
}
DIYæ奜家ãžã®ç°¡åãªã¡ã¢ïŒé åã®é åãäœæããã«ã¯ãarraylistã¿ã€ãã䜿çšãããšãå€ãã®é çã®çš®ãæžããããšãã§ããŸãã
軜éã®è åšãšãµãã°ã©ã
ç°åžžãªã°ã©ãã«ã¯ããŸããŸãªã¢ã«ãŽãªãºã ããããŸããç§ã䜿çšãããã®ã¯ãã€ã³ã¿ãŒãããã§èŠã€ããç¹å®ã®graphBADã«åºã¥ããŠããŸãããŸããèŠã€ãããããã«ãªã³ã¯ãæäŸããŸãã
äžè¬ã«ãå®éã®è åšæ€åºã«ãããäž»ãªåé¡ã¯ãããŒã¹ã©ã€ã³ã圢æããããã®é©åãªããŒã¿ã»ãããèŠã€ããããšã§ãããã«ã¿ã€ã ã®ããã¬ãŒããã³ããŒãã£ãŒã¿ã€ã ã®è åšæ€åºã¹ãã·ã£ãªã¹ããšããŠãç§ã¯å€ãã®ç°ãªãã¢ããªã±ãŒã·ã§ã³ãå«ãååã«èå³æ·±ãSysmonãã°ãäœæããããšãã§ããŸããã§ãããéã¿ã®åºãããååã«ãªãã£ããããç°åžžãªãµãã°ã©ããçæããããšã¯éåžžã«å°é£ã§ããããããã«ãããå®ãµãŒããŒã䜿çšãããšãç§ã®å Žåã®ããã«ãAWSWindowsã€ã³ã¹ã¿ã³ã¹ããšãã©ã䜿çšãããããã¯ããã«åªããããŒã¿ã»ãããåŸãããå¯èœæ§ããããŸãã
ç§ãæžããç°åžžãªã°ã©ãã®PSã¹ã¯ãªããã¯ãå¹³åéã¿ãäœãçããããµãã°ã©ããããªãäžããŸããããããŠãç§ã¯ããã€ãã®èå³æ·±ãç°å¢ãæãŸããããšããã§ããŸããïŒä»¥äžãåç §ïŒã
ãµãã°ã©ãã®éã¿ã¢ã«ãŽãªãºã ã®å®è¡ïŒãµãã°ã©ã7ã®éã¿ãäœãèå³æ·±ãç°å¢
åè¿°ããããã«ãåçŽãªéã¿ä»¥å€ã®ã¡ããªãã¯ã䜿çšããŠã°ã©ãã®ç°åžžãæ€åºããããã®ãåŠç¿ãã䟡å€ã®ããã¢ã«ãŽãªãºã ã¯ä»ã«ããããŸãããããã®1ã€ã¯ããé¡äŒŒãããé ç¹ã®ã¯ã©ã¹ã¿ãŒãæ¢ããæ¥ç¶ãŸãã¯ç°ãªãç°å¢éã®æ¥ç¶ã«æ°ã¥ããŸãããã®å Žåãç°åžžã¯ãä»ã®ç¹æ§ã䜿çšããŠç°å¢ãæ¥ç¶ãããŠãŒã¶ãŒãŸãã¯ããã»ã¹ã«ãããŸããããã¯çã«ããªã£ãŠããŸããã
ããªãã®å ãªããªã¿ã¯ãããªãã«åŒ·ããªããããªãã¯ã¹ãã£ã³ããã§ãã¯ããããšãã§ããŸãïŒãããã¯ãŒã¯ã®æ§é ã¯ã©ã¹ã¿ãªã³ã°ã¢ã«ãŽãªãºã ïŒãäžèšãå®è¡ããŸããDoug Finkeã®PowerShellã¢ã«ãŽãªãºã ãšäžç·ã«äœ¿çšããããšãã§ããŸãããç§èªèº«ããã®ãããžã§ã¯ããåŒãåããŠãããã«GitHubã«èŒããããšæã£ãŠããŸãã
ã©ã³ãã ãŠã©ãŒã¯ã§ç°åžžãèŠã€ãã
è åšã°ã©ãã®ç°åžžãèŠã€ããå¥ã®æ¹æ³ã§ãã®ã»ã¯ã·ã§ã³ãçµäºããŸããããåã®ããŒãã®æåŸã§ãã®ã¢ãããŒãã«ã€ããŠèšåããŸãããç§ã«ãšã£ãŠããããªããã«æ°åŠãæã£ãŠãã人ãšããŠã圌ã¯ããçŽæçã§ãããããŠãå€ããã¬ãçªçµnumb3rsã®ãã¡ã³ã¯ã[åããããã«ãã]ãã«ã³ããã§ãŒã³ã®æŠå¿µãããã«èªèããŸãã
ä»ã®ãã¹ãŠã®äººã«ãšã£ãŠãããã¯ã°ã©ãã®ãã©ã³ãã ãŠã©ãŒã¯ããšèããããšãã§ããŸããåé ç¹ã§ããã€ã¹ã転ããããã®éã¿ã«å¿ããŠã°ã©ãã®ãšããžãéžæããŸãããšããžã®éã¿ã倧ããã»ã©ãããã«åŸãå¯èœæ§ãé«ããªããŸããã°ã©ãã2ã€ã®éšåã«åå²ããå¿ èŠããããŸãïŒã°ã©ãçè«ã§ã¯2éšã°ã©ããšåŒã°ããŸãïŒãäžæ¹ã¯ãŠãŒã¶ãŒãããäžæ¹ã¯ã¢ããªã±ãŒã·ã§ã³ã§ãã
次ã«ãããªãã¯ã©ã³ã¯ä»ãããŸãç¹å®ã®é ç¹ã«å°éãã確çã«åºã¥ããŠãŠãŒã¶ãŒããå°éã§ãããã¹ãŠã®é ç¹ã¢ããªã±ãŒã·ã§ã³ãè åšãåæããã«ã¯ãå®è¡äžã®ã¢ããªã±ãŒã·ã§ã³ãæ€çŽ¢ãããããã®ããããã«å°éããå¯èœæ§ãéåžžã«äœãå Žåã¯ãå®éã®è åšãèŠã€ããå¯èœæ§ããããŸãã
ããã«ããããGoogleã®PageRankã¢ã«ãŽãªãºã ã«ãªã³ã¯ãã人ã®ã«ã«ããããã«ã€ããŠã¯æ¬¡ã®ã»ã¯ã·ã§ã³ã§è©³ãã説æããŸãããèå³ã®ãã人ã¯ãrestartã䜿çšããŠã©ã³ãã ãŠã©ãŒã¯ãšãããã¬ãŒãºãGoogleã§æ€çŽ¢ã§ããŸãã
ã©ã³ãã ãã©ããŒãµã«çè«ãšEQLãã©ã¯ãã£ã¹
ãã1ã€éžè±ããŠãSysmonãã°ã§äœãéæããããšããŠããã®ããåæããŸããããããã¯ãè åšãæ€åºããã€ã³ã·ãã³ãåŸã«èª¿æ»ãè¡ãããã®åªããããŒã«ã§ãã
- , Sysmon. Sysmon , .
- 2 Sysmon , , .
- 第3éšã§ã¯ããšããžæ¥ç¶ãéã¿ãšèŠãªã1ã€ã®åçŽãªã¢ã«ãŽãªãºã ã®æŠèŠã詳ãã説æããŸãããã°ã©ãå šäœã®å¹³åééã®åèšãããïŒãšããžã«é¢ããŠïŒè»œãã°ã©ãã®ã»ã¯ã·ã§ã³ã¯ãæœåšçãªè åšã«ãªãå¯èœæ§ããããŸãããã®ã»ã¯ã·ã§ã³ããGitHubã«ã¢ã«ãŽãªãºã ã®PowerShellã¹ã¯ãªãããã¢ããããŒãããŸãïŒãããã«ã«ãŒãœã«ãåãããåŸïŒã
ãããã®æ¹æ³ã®å©ç¹ã¯ãæ»æè ã絶ããå€æŽãŸãã¯ãã¹ã¯ããç¹å®ã®ã³ãã³ããããã»ã¹åã«äŸåããªãããšã§ãã
ããã«ãè匱æ§ãèŠã€ããããã®å¥ã®ç¢ºçããŒã¹ã®æ¹æ³ããããŸããããã詳ããèŠãŠã¿ãŸãããã
Sysmonã€ãã³ãã«åºã¥ãããŒã¿ããã®è匱æ§ã®ã°ã©ãã®ã©ã³ãã ãã©ããŒã¹
ã°ã©ãèªäœã®æ§é ãåæãã代ããã«ããªã³ã¯ããã¹ãŸãã¯ããŒãããããšèããããšãã§ããŸãããã®å Žåãåã¢ããªã±ãŒã·ã§ã³ã¯éäžã§å¥ã ã«åæ¢ããŸãã Sysmonãã°ããŒã¿ãããåã¢ããªã±ãŒã·ã§ã³ããã®èŠªããéå§ããé »åºŠãååŸã§ããŸããGitHub
ã§ç§ã®è åšã°ã©ãã¹ã¯ãªãããèŠããšããã®é »åºŠãDougFinkeã®ãã°ãããPowerShellã¢ã«ãŽãªãºã ã䜿çšããŠåãšããžãªããžã§ã¯ãå ã«ä¿åãããŠããããšãããããŸãã
è匱æ§ã°ã©ãã®åãšããžã暪åãé »åºŠã確çãšèŠãªãããšãã§ããŸãïŒ
次ã®ã¹ãããã¯ããã®æ å ±ã䜿çšããŠãããšãã°ãPowerShellã¢ããªã±ãŒã·ã§ã³taskmgr.exeãWindowsããã»ã¹ã¢ãã©ã€ã¶ãŒãã¡ã¢åž³ããŸãã¯hostname.exeãèµ·åããå¯èœæ§ãèŠã€ããããšã§ãã
ç§ã¯äœãããŠããã®ã§ããïŒ
èŠããã«ïŒç§ã¯ç¢ºçé·ç§»ãããªãã¯ã¹ãäœæã§ããã®ã§ããã«ã³ãã®ä¿¡è ã«æãããŠããŸãã¢ããªã³ã°ã·ã¹ãã ã§äžè¬çã«äœ¿çšãããŸããå®éããã€ã¹ã転ãããã°ã©ãå ã®æ¬¡ã®ã¢ããªã±ãŒã·ã§ã³ã«ç§»åãããããã®ã¢ã¯ã·ã§ã³ãç¹°ãè¿ãããšã¯ãã°ã©ãã®ã©ã³ãã ãªãã©ããŒã¹ã§ããæçµçã«ããã®æ°åŠçæ¹æ³ã¯ãéå§ç¹ããããã«å°éãã確çã«åŸã£ãŠãã°ã©ãã®åé ç¹ãã©ã³ã¯ä»ãããŸããããšãã°ãWindows Explorerããã¹ãã¬ããã·ãŒããèµ·åããããšã¯éåžžã«äžè¬çãªããã»ã¹ã§ãããWindows Script Host Engineã¯çè«çã«ã¯éåžžã«éæšæºã§ããããããã£ãŠæœåšçã«è åšã®ææšã§ããããšãããããŸãã
ãã®æ¹æ³ã¯ãã©ã³ãã ãŠã©ãŒã¯ãŠã£ãºãªã¹ã¿ãŒãïŒä»¥äžãRWWRãã©ã³ãã ãŠã©ãŒã¯ãŠã£ãºãªã¹ã¿ãŒãïŒãšããŠç¥ãããŠãããä»ã§ã¯äŒèª¬çãªGooglePageRankã©ã³ãã³ã°ã¢ã«ãŽãªãºã ã®ããªãšãŒã·ã§ã³ã§ãã
ãããã®ã©ã³ã¯ãèšç®ããããã«ç§ãæžããã¹ã¯ãªããã®äžéšãèŠãŠã¿ãŸãããã
#lets build a row
$row= @(0)*$g.vertices.count
$w=0
foreach($e in $start.getEdges()) { #calculate total frequency
$w+=$e.weight
}
if ($w -eq 0) { #make it connected
$row[$ix] =1
}
else { #we assign probabilitys
#now create transition probability
foreach($e in $start.getEdges()) {
$ev = $e.endVertex
$p = $e.weight
$jx = v-index $ev.value.Key
$row[$jx]= $p/$w #normalize by dividing by total
}
}
$P[$ix] = $row #yay! One row added to transition matrix
åé ç¹ã«ã€ããŠããã¹ãŠã®ãã€ããŒã®çµæã®é »åºŠãèšç®ããæ£èŠåã«ããåé·ç§»ã®ç¢ºçãåèšã«å²ãåœãŠãŸãããããã£ãŠãPowerShell.exeããã¹ãŠã®ãã€ããŒã«20åã¢ã¯ã»ã¹ããããnc.exeãPowerShell.exeã®å é ãã1åã ãã¢ã¯ã»ã¹ããå Žåãã¢ã¯ã»ã¹ãã確çã¯1/20ãŸãã¯0.05ã«ãªããŸããããã¯è«ççã§ããïŒ
RWWRã§äœ¿çšããããããªãã¯ã¹ãèšç®ããã®ã¯å°é£ã§ããã確çè«çã¢ããªã³ã°ã®ã¬ãã¹ã³ã«åå ãã人ã«ãšã£ãŠããã®æé ã¯é£ãããããŸãããMediumã®Webãµã€ãã«ããã®ããŒãã«é¢ããåªããã¬ãã¥ãŒèšäºããããŸãã
ç§ãã©ã³ãã è©äŸ¡è ãšåŒãã§ããç§ã®ã¹ã¯ãªããã¯ãæå°ã®10ãã©ã³ã¯ä»ãããŠåºåããŸããªã¹ãããã®å€ããããã£ãŠãè åšã°ã©ãã®ç¹å®ã®é ç¹ããéå§ããŠãèµ·åãããå¯èœæ§ãæãäœãã¢ããªã±ãŒã·ã§ã³ãååŸã§ããŸããPowerShell.exeãéå§ç¹ãšããŠäœ¿çšããå Žåã®çµæã¯æ¬¡ã®ãšããã§ãã
ã©ã³ãã ãŠã©ãŒã¯ãŠã£ãºãªã¹ã¿ãŒãã¢ã«ãŽãªãºã ã¯ãã°ãŒã°ã«ã®ãããªè åšã®ã©ã³ãã³ã°ãçæã§ããŸããããŒããwhoamiã¯å®è¡ãããå¯èœæ§ãæãäœãã§ãã
å®çšçãªæ³šæãšèŠåãšããŠãPWWRã¯å®éã®ã·ã¹ãã ã§ã¯ããã°ããŒã¿ã®åé¡ã«ãªãããšã«æ³šæããŠãã ãããç§ã®å°ããªSysmonãã°ã®å Žåã§ããæµ®åå°æ°ç¹æŒç®ã®æ°ãå€ããããèšç®ã®é ããéåžžã«é¡èã§ããã
è åšåæã®ããã®ã€ãã³ãã¯ãšãªèšèªïŒEQLïŒ
ä»ã®ãšããã補åã®è åšãæ€åºããããã«ããé«åºŠãªã¢ãããŒãã䜿çšããŠãããã³ããŒã¯ãããªããç§ãèªåã§ã§ããããšãã¯ããã«è¶ ããŠããããšã«æ³šæããŠãã ããããããŠãééããªããã¯ããã«é«ã粟床ã§ã
è åšã®æ€åºã®ãããã¯ã«é£ã³èŸŒã¿ããããç§ã®ã¹ã¯ãªãããæäœããããªã人ã®ããã«-ç§ã¯ç解ããŠããŸãïŒ -ã€ãã³ãã¯ãšãªèšèªããŸãã¯EQLããããŸããããã¯ãSysmon Log Query Languageãé©çšããããã®ãªãŒãã³ãœãŒã¹ãããžã§ã¯ãã§ããããã«ã€ããŠã¯ãéåžžã«å æ¬çãªæçš¿ã§è©³ããç¥ãããšãã§ããŸãã..ã EQLã¯ãã€ã³ã·ãã³ãã®èª¿æ»ã«æé©ã§ããã ãã§ãªããSysmonãã°ã®æè¿ã®ã³ããŒãããéããããŒã«ãšããŠã䜿çšã§ããŸãã
EQLã¹ã€ãŒãã¯ããã°ã人éãèªã¿åããJSONã«å€æããã€ãã³ããã³ãã©ãŒãæäŸããŸããç§ã®ãã©ã³ãã®ã³ããŒã¯GitHubã§ãã§ãã¯ã§ããŸããç§ã®éçãªshow-threat- pathPSã¹ã¯ãªãããšã¯ç°ãªããEQLã§ã¯ãã®å Žã§ã¯ãšãªãå®è¡ã§ããŸãã
scvhost.exeã«ä»£ãã£ãŠèµ·åããããã¹ãŠã®cmd.exeã·ã§ã«ã«é¢å¿ããããšããŸããããããã¯ãæ»æè ãpsexec.exeãŸãã¯smb.exeã䜿çšããããšã瀺ããŠããå¯èœæ§ããããŸãããªã¯ãšã¹ãã¯æ¬¡ã®ããã«ãªããŸãã
EQLã䜿çšããŠãsvchost.exeããèµ·åãããã·ã§ã«cmd.exeãæ€çŽ¢ããŸããã¡ãªã¿ã«ãjqã¯JSONããŒã¿ã衚瀺ããããã®LinuxãŠãŒãã£ãªãã£ã§ãã
å修食åã䜿çšããŠãã®çµæãååŸããã«ã¯ãããã«ã¯ãŒã«ã§åŒ·åãªæ¹æ³ããããŸãããã®ãããªEQLã¯ãšãªã䜿çšãããšãéå±€å ã®ä»»æã®å Žæã§ãæå®ãããç¥å ãæã€ãã¹ãŠã®ããã»ã¹ãæ€çŽ¢ã§ããŸããããšãã°ãç¥å ãšããŠ0056.exeããã»ã¹ããããããã§èª¬æããããç¥ãããè匱æ§ãæªçšããå¯èœæ§ã®ããã¢ããªã±ãŒã·ã§ã³ãæ€çŽ¢ã§ããŸãã
ãã®ãã§ã«é·ãæçš¿ã§ã¯EQLã«ã€ããŠèšãããšãå€ãããã®ã§ãè匱æ§ãèŠã€ããããã®EQLã®ç¿åŸã®è©³çŽ°ã«é¢ããå¥ã®èšäºãå ¬éããããšæããŸãã
DIYè åšæ€åºãœãªã¥ãŒã·ã§ã³ã«é¢ããæçµçãªèã
ãã®èšäºã§èª¬æãããŠãããã¹ãŠã®è åšæ€åºã¹ã¯ãªãããå«ãSysmonãªããžããªãããŠã³ããŒãããããšãçŽæããŸãããæ°ããã°ã©ãããŒã¹ã®è åšæ€åºããŒã«ãè¿œå ã®ããã¥ã¡ã³ããšãšãã«è¿œå ããäºå®ãªã®ã§ãGitHubãå®æçã«ç¢ºèªããŠãã ããã1ã€ã®èšäºã§ã«ããŒããã«ã¯å€ãããŸãã
ããã§ãšãããããŸãïŒ
ç§ã®ã¹ã¯ãªãããè©Šãããç¬èªã®è åšæ€åºã®ã¢ã€ãã¢ãéçºããããã®åºç€ãšããŠäœ¿çšããŠãã ããã PowerShellã¯ãè€éãªã¢ã«ãŽãªãºã ã«æé©ã§ãã Linuxã·ã§ã«èšèªã§è²ã£ãç§ã«ãšã£ãŠãæçããã¹ã¯ãªããèšèªã§äœæ¥ããããšã¯å¬ããé©ãã§ããããããŠãPowerShellã®ã£ã©ãªãŒããã§ãã¯ããããšããå§ãããŸããæ¢è£œã®ããã«ã¹ã¯ãªããã®ãã1ã€ã®åªãããªãœãŒã¹ïŒPowerShellã®äžçã§è»èŒªãåçºæããå¿ èŠã¯ãããŸããã
èšäºå šäœããã®ãã1ã€ã®éèŠãªãã€ã³ãã¯ããšã³ã¿ãŒãã©ã€ãºã°ã¬ãŒãã®ãœãªã¥ãŒã·ã§ã³ã®ãã³ããŒããITéçºè ãèªç±æéã«äœæã§ãããã®ãããã¯ããã«é«åºŠãªè åšæ€åºãã¯ãããžãŒã䜿çšããŠããã ãã§ãªãããããã®ãœãªã¥ãŒã·ã§ã³ããã©ãã£ãã¯ã¬ãã«ã§æ©èœããããã«é©å¿ã§ããããšã§ãã倧èŠæš¡ãªçµç¹ããã¡ãããDIYãœãªã¥ãŒã·ã§ã³ã䜿çšããŠãååã«æŽ»çšãããŠããªããµãŒããŒãåæãããããšã³ã¿ãŒãã©ã€ãºè£œåã®è¿œå ã®æ€èšŒãè¡ã£ããããããšããå§ãããŸããããããè åšã®ã€ã³ããªãžã§ã³ã¹ãšèå¥ã¯ç¢ºãã«å€§ããªããŒã¿ã®åé¡ã§ãããPowerShellã解決ã§ãã課é¡ã§ã¯ãªãããšã¯æããã§ãã
Varonisãè åšã®åæãšæ€åºãåŠçããæ¹æ³ã«ã€ããŠè©³ããç¥ãããå Žåã¯ããã€ã§ãå人çšãã¢ããªã¯ãšã¹ãã§ããŸãã