SlideShare a Scribd company logo
Leveraging	
  Splunk	
  for	
  finding	
  
needle	
  in	
  the	
  haystack	
  
twi%er.com/abhaythehero	
  
Introduc5on	
  	
  
•  What	
  is	
  it	
  ?	
  Tool.	
  For	
  searching	
  and	
  exploring	
  
data	
  -­‐>	
  Extrac5ng	
  informa5on	
  #LikeABoss	
  
•  Who	
  uses	
  it	
  ?	
  Sysadmins,	
  Network	
  admins,	
  
Infosec	
  people.	
  
•  Why	
  use	
  it	
  ?	
  Because	
  you	
  want	
  to	
  find	
  needle	
  
in	
  the	
  haystack.	
  #LikeABoss	
  
Features	
  	
  
•  Free	
  if	
  you	
  index	
  upto	
  500MB	
  daily	
  
•  Easy	
  to	
  install.	
  	
  
•  Powerful	
  Web	
  interface.	
  Excellent	
  UI.	
  
•  Capability	
  to	
  accept	
  data	
  over	
  network	
  from	
  
mul5ple	
  sensors	
  
•  Almost	
  real-­‐5me	
  genera5on	
  of	
  alerts	
  
•  Teaming	
  up.	
  Access	
  controls.	
  Etc	
  ..	
  
•  Reports	
  with	
  great	
  visuals	
  !!	
  
•  And	
  much	
  more	
  …..	
  
	
  
How	
  it	
  manages	
  to	
  do	
  stuff	
  ?	
  
•  Index	
  Time	
  Processing	
  (when	
  splunk	
  is	
  
accep5ng	
  data):	
  Read	
  data	
  from	
  source.	
  
Extract	
  5mestamp.	
  Break	
  stuffs	
  into	
  ‘events’	
  
based	
  on	
  5mestamp	
  
•  Search	
  Time	
  Processing	
  (when	
  you	
  search):	
  
Events	
  which	
  have	
  matching	
  ‘even&ype’	
  to	
  the	
  
search	
  term,	
  are	
  retrieved	
  from	
  index.	
  	
  
Leveragong splunk for finding needle in the Haystack
 	
  	
  	
  	
  	
  	
  -­‐	
  Image	
  taken	
  from	
  the	
  book	
  Exploring	
  Splunk	
  
SPL	
  
Search	
  commands	
  are	
  used	
  to	
  take	
  indexed	
  data	
  and	
  filter	
  
unwanted	
  informa5on,	
  extract	
  more	
  informa5on,	
  calculate	
  
values,	
  transform	
  them,	
  and	
  sta5s5cally	
  analyze	
  results.	
  
	
  
	
  
Enough	
  Theory	
  already….?	
  
Lets	
  inspect	
  some	
  	
  
real	
  world	
  scenario	
  
	
  
Someone	
  got	
  hacked	
  K	
  
By	
  some	
  0	
  –	
  day	
  vulnerability	
  
Payback	
  5me	
  bitchezz!!	
  
Payback	
  ini5al	
  goal	
  set.	
  Targets	
  locked	
  :	
  
	
  	
  
•  ‘Check	
  your	
  6’	
  aka	
  Log	
  analysis	
  
•  1	
  months	
  worth	
  of	
  apache,	
  mysql,	
  bp	
  logs	
  
obtained	
  by	
  our	
  hos5ng	
  provider	
  
•  Find	
  the	
  vulnerability	
  PoC.	
  	
  
•  Find	
  the	
  a%acker	
  methodology.	
  
Lets	
  take	
  the	
  apache	
  logs	
  here..	
  	
  
1.  garage4hackers.com	
  was	
  redirec5ng	
  to	
  
garage4hackers.com/ac5vity.php	
  
	
  	
  	
  	
  	
  	
  Inference	
  :	
  Defacement	
  page	
  was	
  uploaded	
  
	
  	
  	
  	
  	
  	
  by	
  manipula5ng	
  clean	
  version	
  of	
  ac5vity.php	
  
	
  
Lets	
  do	
  a	
  à	
  
index=”<index	
  name>”	
  uri_path="*/
ac5vity.php*"	
  
2.  The	
  defacement	
  page	
  was	
  sta5c.	
  While	
  the	
  	
  
	
  	
  	
  	
  	
  	
  earlier	
  clean	
  ac5vity.php	
  would	
  return	
  	
  
	
  	
  	
  	
  	
  	
  different	
  results	
  each	
  5me.	
  And	
  that	
  result	
  
	
  	
  	
  	
  	
  	
  page	
  won’t	
  be	
  of	
  same	
  size	
  every5me	
  ;)	
  
	
  	
  	
  	
  	
  	
  Inference:	
  We	
  should	
  check	
  the	
  response	
  
	
  	
  	
  	
  	
  	
  bytes	
  which	
  the	
  server	
  sends	
  each	
  5me	
  for	
  a	
  	
  
	
  	
  	
  	
  	
  	
  request.	
  
	
  
Lets	
  do	
  a	
  à	
  
index=”<index	
  name>"	
  uri_path="*/
ac5vity.php*"	
  |	
  top	
  bytes	
  
3.	
  25424	
  is	
  definitely	
  the	
  size	
  of	
  defaced	
  page	
  	
  
	
  	
  	
  	
  returned	
  by	
  server.	
  Because	
  of	
  sta5c	
  value	
  for	
  
	
  	
  	
  	
  each	
  response.	
  Also	
  we	
  saved	
  the	
  defaced	
  
	
  	
  	
  	
  page	
  on	
  disk	
  and	
  checked	
  it	
  size.	
  (which	
  
	
  	
  	
  	
  enforced	
  the	
  theory)	
  
	
  	
  	
  	
  	
  
	
  	
  	
  	
  Inference:	
  The	
  first	
  5me	
  25424	
  bytes	
  are	
  	
  
	
  	
  	
  	
  returned,	
  it	
  could	
  be	
  the	
  a%acker	
  wan5ng	
  to	
  	
  	
  
	
  	
  	
  	
  test	
  the	
  result	
  aber	
  uploading	
  the	
  defacement	
  
	
  	
  	
  	
  page	
  
	
  
4.	
  	
  	
  	
  	
  25424	
  bytes	
  are	
  returned	
  for	
  the	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  defacement	
  page	
  by	
  the	
  server.	
  Lets	
  find	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  out	
  who	
  1st	
  got	
  it	
  !	
  	
  
	
  
Lets	
  do	
  a	
  à	
  
index=”<index	
  name>"	
  bytes=25424	
  |	
  reverse	
  
	
  
And	
  note	
  the	
  first	
  5mestamp.	
  Start	
  digging	
  near	
  
the	
  5mestamp	
  ;)	
  	
  	
  
Conclusions	
  
•  We	
  got	
  the	
  defacer	
  IP	
  
•  We	
  enforced	
  the	
  fact	
  with	
  co	
  –	
  rela5ons	
  with	
  
MySQL	
  logs	
  (	
  can’t	
  show	
  you	
  that	
  :P)	
  
•  We	
  also	
  dug	
  out	
  more	
  to	
  find	
  the	
  fact	
  that	
  the	
  
defacer	
  IP	
  !=	
  the	
  IP	
  which	
  first	
  exploited	
  the	
  
vulnerability	
  	
  
•  We	
  got	
  an	
  idea	
  in	
  which	
  module	
  the	
  
vulnerability	
  was.	
  
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Of	
  course	
  payback	
  was	
  much	
  more	
  !	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  But	
  that	
  is	
  the	
  story	
  for	
  another	
  5me	
  J	
  	
  
Till	
  then	
  w00t	
  w00t	
  

More Related Content

PPTX
Testing in Infrastructure
PPTX
Release the Monkeys ! Testing in the Wild at Netflix
PDF
Refactoring a web application with Python
PPT
C# Async on iOS and Android - Craig Dunn, Developer Evangelist at Xamarin
PPTX
C# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
PDF
Web Operations101
PDF
Infinum Android Talks #05 - Square tape
PPTX
Cloud Native Batch Processing
Testing in Infrastructure
Release the Monkeys ! Testing in the Wild at Netflix
Refactoring a web application with Python
C# Async on iOS and Android - Craig Dunn, Developer Evangelist at Xamarin
C# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
Web Operations101
Infinum Android Talks #05 - Square tape
Cloud Native Batch Processing

What's hot (20)

PDF
Code fast & Break things with Jenkins & Continuous Integration
PPTX
Intro to Netflix's Chaos Monkey
PDF
Rust, Redis, and Protobuf - Oh My!
PDF
Mistral Atlanta design session
PPTX
The tale of 100 cve's
PPTX
Managing AWS infrastructure using CloudFormation
PPTX
I Don't Test Often ...
PDF
Micrometerでメトリクスを収集してAmazon CloudWatchで可視化
PDF
What's new in FME 2019: FME Server
PDF
Engage 2020: Hello are you listening, There is stream for everything
PPTX
Developer day - AWS: Fast Environments = Fast Deployments
PPTX
Heritrix REST API
PDF
Legacy Sins
PDF
What's new in FME 2019: FME Desktop
PDF
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
PPTX
True Confessions of Host named site collections in SharePoint 2013
PDF
Automation of web attacks from advisories to create real world exploits
PDF
A Customized Approach to HTTP Proxy Caching in Ruby
PDF
PuppetConf 2016: Site Launch Automation: From Days to Minutes – Kristen Crawf...
PDF
Mistral OpenStack Meetup Feb 5
Code fast & Break things with Jenkins & Continuous Integration
Intro to Netflix's Chaos Monkey
Rust, Redis, and Protobuf - Oh My!
Mistral Atlanta design session
The tale of 100 cve's
Managing AWS infrastructure using CloudFormation
I Don't Test Often ...
Micrometerでメトリクスを収集してAmazon CloudWatchで可視化
What's new in FME 2019: FME Server
Engage 2020: Hello are you listening, There is stream for everything
Developer day - AWS: Fast Environments = Fast Deployments
Heritrix REST API
Legacy Sins
What's new in FME 2019: FME Desktop
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
True Confessions of Host named site collections in SharePoint 2013
Automation of web attacks from advisories to create real world exploits
A Customized Approach to HTTP Proxy Caching in Ruby
PuppetConf 2016: Site Launch Automation: From Days to Minutes – Kristen Crawf...
Mistral OpenStack Meetup Feb 5
Ad

Similar to Leveragong splunk for finding needle in the Haystack (20)

PDF
Bug bounty null_owasp_2k17
PDF
Research and describe a tool that can be used to test for web server.pdf
PDF
Insecurity-In-Security version.1 (2010)
PPTX
Secure Coding 101 - OWASP University of Ottawa Workshop
PDF
Lets Make our Web Applications Secure
PPTX
Application and Website Security -- Fundamental Edition
PDF
Web Vulnerabilities_NGAN Seok Chern
PPT
Hacking web applications
PPTX
A Closer Look on C&C Panels
PPT
Web application security
PPT
Web application security
PDF
6 Scope & 7 Live Data Collection
PPT
Sembang2 Keselamatan It 2004
PDF
OpenFest 2012 : Leveraging the public internet
PPT
Edinburgh
PDF
Web Security: What's wrong, and how the bad guys can break your website
PPTX
Web Application Vulnerabilities
PPTX
The Enemy Within: Organizational Insight Through the Eyes of a Webserver
PPS
Manindra kishore _incident_handling_n_log_analysis - ClubHack2009
Bug bounty null_owasp_2k17
Research and describe a tool that can be used to test for web server.pdf
Insecurity-In-Security version.1 (2010)
Secure Coding 101 - OWASP University of Ottawa Workshop
Lets Make our Web Applications Secure
Application and Website Security -- Fundamental Edition
Web Vulnerabilities_NGAN Seok Chern
Hacking web applications
A Closer Look on C&C Panels
Web application security
Web application security
6 Scope & 7 Live Data Collection
Sembang2 Keselamatan It 2004
OpenFest 2012 : Leveraging the public internet
Edinburgh
Web Security: What's wrong, and how the bad guys can break your website
Web Application Vulnerabilities
The Enemy Within: Organizational Insight Through the Eyes of a Webserver
Manindra kishore _incident_handling_n_log_analysis - ClubHack2009
Ad

More from n|u - The Open Security Community (20)

PDF
Hardware security testing 101 (Null - Delhi Chapter)
PPTX
SSRF exploit the trust relationship
PDF
PDF
Api security-testing
PDF
Introduction to TLS 1.3
PDF
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
PDF
Talking About SSRF,CRLF
PPTX
Building active directory lab for red teaming
PPTX
Owning a company through their logs
PPTX
Introduction to shodan
PDF
Detecting persistence in windows
PPTX
Frida - Objection Tool Usage
PDF
OSQuery - Monitoring System Process
PDF
DevSecOps Jenkins Pipeline -Security
PDF
Extensible markup language attacks
PPTX
PDF
Hardware security testing 101 (Null - Delhi Chapter)
SSRF exploit the trust relationship
Api security-testing
Introduction to TLS 1.3
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Talking About SSRF,CRLF
Building active directory lab for red teaming
Owning a company through their logs
Introduction to shodan
Detecting persistence in windows
Frida - Objection Tool Usage
OSQuery - Monitoring System Process
DevSecOps Jenkins Pipeline -Security
Extensible markup language attacks

Recently uploaded (20)

PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
Hazard Identification & Risk Assessment .pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
advance database management system book.pdf
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
Empowerment Technology for Senior High School Guide
PDF
Trump Administration's workforce development strategy
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PPTX
20th Century Theater, Methods, History.pptx
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
1_English_Language_Set_2.pdf probationary
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Hazard Identification & Risk Assessment .pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Introduction to pro and eukaryotes and differences.pptx
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
FORM 1 BIOLOGY MIND MAPS and their schemes
advance database management system book.pdf
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
Empowerment Technology for Senior High School Guide
Trump Administration's workforce development strategy
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
20th Century Theater, Methods, History.pptx
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
1_English_Language_Set_2.pdf probationary
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx

Leveragong splunk for finding needle in the Haystack

  • 1. Leveraging  Splunk  for  finding   needle  in  the  haystack   twi%er.com/abhaythehero  
  • 2. Introduc5on     •  What  is  it  ?  Tool.  For  searching  and  exploring   data  -­‐>  Extrac5ng  informa5on  #LikeABoss   •  Who  uses  it  ?  Sysadmins,  Network  admins,   Infosec  people.   •  Why  use  it  ?  Because  you  want  to  find  needle   in  the  haystack.  #LikeABoss  
  • 3. Features     •  Free  if  you  index  upto  500MB  daily   •  Easy  to  install.     •  Powerful  Web  interface.  Excellent  UI.   •  Capability  to  accept  data  over  network  from   mul5ple  sensors   •  Almost  real-­‐5me  genera5on  of  alerts   •  Teaming  up.  Access  controls.  Etc  ..   •  Reports  with  great  visuals  !!   •  And  much  more  …..    
  • 4. How  it  manages  to  do  stuff  ?   •  Index  Time  Processing  (when  splunk  is   accep5ng  data):  Read  data  from  source.   Extract  5mestamp.  Break  stuffs  into  ‘events’   based  on  5mestamp   •  Search  Time  Processing  (when  you  search):   Events  which  have  matching  ‘even&ype’  to  the   search  term,  are  retrieved  from  index.    
  • 6.              -­‐  Image  taken  from  the  book  Exploring  Splunk  
  • 7. SPL   Search  commands  are  used  to  take  indexed  data  and  filter   unwanted  informa5on,  extract  more  informa5on,  calculate   values,  transform  them,  and  sta5s5cally  analyze  results.      
  • 8. Enough  Theory  already….?   Lets  inspect  some     real  world  scenario    
  • 10. By  some  0  –  day  vulnerability  
  • 11. Payback  5me  bitchezz!!   Payback  ini5al  goal  set.  Targets  locked  :       •  ‘Check  your  6’  aka  Log  analysis   •  1  months  worth  of  apache,  mysql,  bp  logs   obtained  by  our  hos5ng  provider   •  Find  the  vulnerability  PoC.     •  Find  the  a%acker  methodology.  
  • 12. Lets  take  the  apache  logs  here..     1.  garage4hackers.com  was  redirec5ng  to   garage4hackers.com/ac5vity.php              Inference  :  Defacement  page  was  uploaded              by  manipula5ng  clean  version  of  ac5vity.php     Lets  do  a  à   index=”<index  name>”  uri_path="*/ ac5vity.php*"  
  • 13. 2.  The  defacement  page  was  sta5c.  While  the                earlier  clean  ac5vity.php  would  return                different  results  each  5me.  And  that  result              page  won’t  be  of  same  size  every5me  ;)              Inference:  We  should  check  the  response              bytes  which  the  server  sends  each  5me  for  a                request.     Lets  do  a  à   index=”<index  name>"  uri_path="*/ ac5vity.php*"  |  top  bytes  
  • 14. 3.  25424  is  definitely  the  size  of  defaced  page            returned  by  server.  Because  of  sta5c  value  for          each  response.  Also  we  saved  the  defaced          page  on  disk  and  checked  it  size.  (which          enforced  the  theory)                    Inference:  The  first  5me  25424  bytes  are            returned,  it  could  be  the  a%acker  wan5ng  to              test  the  result  aber  uploading  the  defacement          page    
  • 15. 4.          25424  bytes  are  returned  for  the                          defacement  page  by  the  server.  Lets  find                    out  who  1st  got  it  !       Lets  do  a  à   index=”<index  name>"  bytes=25424  |  reverse     And  note  the  first  5mestamp.  Start  digging  near   the  5mestamp  ;)      
  • 16. Conclusions   •  We  got  the  defacer  IP   •  We  enforced  the  fact  with  co  –  rela5ons  with   MySQL  logs  (  can’t  show  you  that  :P)   •  We  also  dug  out  more  to  find  the  fact  that  the   defacer  IP  !=  the  IP  which  first  exploited  the   vulnerability     •  We  got  an  idea  in  which  module  the   vulnerability  was.  
  • 17.                                                Of  course  payback  was  much  more  !                      But  that  is  the  story  for  another  5me  J     Till  then  w00t  w00t