04.10.2015 Views

Security Jiujitsu

conf2015_DVeuve_Splunk_SecurityCompliance_SecurityJiujitsuBuildingCorrelation

conf2015_DVeuve_Splunk_SecurityCompliance_SecurityJiujitsuBuildingCorrelation

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Analysis <br />

| tstats prestats=t summariesonly=t count(All_Sessions.src_ip) from <br />

datamodel=Network_Sessions where All_Sessions.src_ip!=All_Sessions.dest_ip <br />

All_Sessions.src_ip=* earliest=-­‐30d@d groupby All_Sessions.src_ip _Eme span=1d <br />

| tstats prestats=t append=t summariesonly=t count(All_Sessions.dest_ip) from <br />

datamodel=Network_Sessions where All_Sessions.src_ip!=All_Sessions.dest_ip <br />

All_Sessions.dest_ip=* earliest=-­‐30d@d groupby All_Sessions.dest_ip _Eme <br />

span=1d | rename All_Sessions.src_ip as ip All_Sessions.dest_ip as ip | bucket <br />

_Eme span=1d | stats count(All_Sessions.src_ip) as iniEaEng <br />

count(All_Sessions.dest_ip) as terminaEng by ip _Eme | eval isRecent = <br />

if(_Eme>relaEve_Eme(now(), "-­‐1d"), "yes", "no") | eval raEo = coalesce(iniEaEng,<br />

0) / (coalesce(iniEaEng,0)+coalesce(terminaEng,0)) | where isnotnull(raEo) | <br />

stats sum(iniEaEng) sum(terminaEng) avg(eval(if(isRecent="no", raEo, null))) as <br />

avg_raEo avg(eval(if(isRecent="yes", raEo, null))) as recent_raEo by ip | where <br />

isnotnull(recent_raEo) AND isnotnull(avg_raEo) | where (avg_raEo > 0.9 AND <br />

recent_raEo < 0.8) OR (avg_raEo < 0.1 AND recent_raEo > 0.2) <br />

67

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!