index= | stats count dc(user) values(user) max(_time) min(_time) by hos index sourcetype
dedup :Aynı değere sahip yinelenen arama sonuçlarını kaldırmak icin
index=wineventlog omer | table _time host user | dedup _ time user
index=wineventlog | top user
index=wineventlog EventCode4688 | top user
index=Fortinet | head 100
En çok trafik olusturan ip leri görmek icin
index=fortinet | head 100 | search sourcetype=fortigate_traffic | stats count by srcip
En çok bilinen trafik adresi
index=fortinet | head 100 | search sourcetype=fortigate_utm | stats count by dstip
Failed Authantication [ Gecersiz Giris Yapma ] yapan kullanicilari bulma
EventCode=4625 (başarısız oturum açma olayları),
index=wineventlog EventCode=4625 | stats count by user
Bize en cok saldiri yapan yanlislikla deneyen source bulmak icin
index=wineventlog EventCode=4625 | stats count by Source_Network_Address
En cok sifre deneyen useri (kullaniciyi) görmek icin
Index=wineventlog EventCode4625 | stats count by user
En cok sifre deneyen host ( makineleri) görmek icin
Index=wineventlog EventCode4625 | stats count by host
Bir kullanicin ( User) bir makineye ( Host ) kac defa sifre denedigini görmek icin
Index=wineventlog EventCode4625 | stats count by user host
Bu kullanicin ( user ) bu makineye (host ) saldiri yaparken hangi sorce leri kullaniyor görmek icin
Index=wineventlog EventCode4625 | stats count by user host Source_Network_Address
Lockout olan kullanici ( user ) bulmak icin
Index=wineventlog lockout
Lockout olan kullanicilarin (user) istatistigi icin
Index=wineventlog |stats count by user
Read time leri yakalamak icin
Index=wineventlog dc(host) user
Passwordünü 3 -5 defa yanlis giren Userlari ( kulluanici ) bulmk icin
Index=wineventlog EventCode4625
|stats count by user
| search count > 5 burada zamani da görüntülemek istersek
Index=wineventlog EventCode4625
|stats count by _time user
bin splunkin zaman kodlarini iceriyor
Index=wineventlog EventCode4625
|bin _time span=5m
|stats count by user bu komutla bütün zamanlari 5 dk lik paketlere bölüyoruz.
Index=wineventlog EventCode4625
|bin _time span=5m
| stats count by _time user
| search count > 5
Her zaman son 5 dk ya bakan 5 dk da bir calisan bir alarmi görmek icin
Index=wineventlog EventCode4625 earliest=-5
| stats count by _time user
| search count > 5
Ya da zamani ayarladigimiz bölüme gidip
Relative git
Bir kullanicinin bir hosta yaptigi yanlis denemelei görmek icin
Index=wineventlog EventCode4625
| stats count by _time user host
| search count > 0
Splunkta komutlari soldan saga dogru okuyoruz. Yukarida kullanicilarin (userlarin) kac farkli host (makinelerde) görüldügü yaziyor, dc ( destinct_count un ) kisaltmasi
Port Taramasi nasil yapilir
Bir porttaki aktörler source ve destination ip dir. Bir sourcenin bir destinationa yaptigi trafiktir.
index=fortinet | stats dc(dstport) by srcip dstip
index=fortinet | stats dc(dstport) as taranan_port_sayisi by srcip dstip
as deyip bir seyin sol tarafindaki aramayi degistirebiliriz.
dc farkli sayma anlaminda
index=fortinet
| stats dc(dsport) as taranan_port_sayisi by srcip dstip | where taranan_port_sayisi > 50
Where ya da search yazarak tarama yapiyoruz
Fortinetteki dstportlar ile ilgili tarama yapmak icin
index=fortinet dstport=3389 | stats count by srcip dstip
index=fortinet dstport=3389 OR dstport=22| stats count by srcip dstip
OR ya anlaminda yukarida ki komutta ya 3389 ya da 22 gibi
index=fortinet dstport=3389 OR dstport=22| stats count by srcip dstip dstport
sonuna ekledigimiz dstport ile hangi srcip nin hangi dstip portan baglandigini görebiliriz.
Hosta göre indexlemek icin
index= wineventlog | stats count dc(user) values(user) max(_time) min(_time) by host
index= wineventlog | stats count dc(user) values(user) max(_time) as son_zaman min(_time) as ilk_zaman by host
index= wineventlog | stats count dc(user) values(user) max(_time) as son_zaman min(_time) as ilk_zaman by host | convert ctime(ilk_zaman)
bu komutlar ile logun ilk zaman ve son zamanlarini görebiliyoruz.
fieldsummary : Veri tabanin da neler arayabilicegimizi gösteriyor.
index= wineventlog | fieldsummary
search ( arama ) kismindan da zamani komutlar ile degistirebiliriz
index=wineventlog user=ldapsync earliest=-60m latest=-10m
earliest=son zaman
latest=en son zaman demek
Search Kisminda ki Bir Komutu Alerte Dönstürmek
searh kisminda bir aramayi alerte dönüstürmek icin girilen komut secilip sag üst kösede ki Save As Alert kismina gidip Alert olusturup kayit ediyoruz.
Tite:Adi (Alertin adi)
Permissions : kisminda Private ( sadece ben mi göreyim) Share in App (ya da tüm soc analiz arkadaslar görsün mü) sec
Alert type:Scheduled sec
Run every week: Zaman (secilecek saatte bir mi haftalik mi gibi
Add Actions : Action olarak ta ne yapilmasi isteniyor ise o secilecek ( email atsin gibi)
index=fortinet dstport=80 OR dstport=22
| stats avg(sentbyte) by srcip dstip dstport
| dedup srcip
index=fortinet dstport=80 OR dstport=22
| stats avg(sentbyte) by srcip dstip dstport
| eval sentbyte=sentbyte/(1024*1024)
index=fortinet
| stats dc(host) by user
IPv4’te, 0.0.0.0 adresi, geçersiz, bilinmeyen veya uygulanamayan bir hedef belirlemek için kullanılan yönlendirilemeyen bir meta adresidir. Bu adrese, istemciler veya sunucular gibi bir dizi bağlamda özel anlamlar atanır.[1]
Lookup konu anlatimi ve videosu