SlideShare a Scribd company logo
https://abhijith.live
1
Automating Web Application
Security Testing Using Hubot
Artificial Intelligence Chat
Bot
Abhijith B R / @abhijithbr
Thoufeeque N S / @thoufeequens #BsidesDelhi2017
:~$ whoami
• Abhijith B R
• Sr. Security analyst at EY
• Traveller and Blogger
https://abhijith.live
2
I do blog : https://abhijith.live
Twitter : @abhijithbr
:~$ whoami
• Thoufeeque N S
• Security analyst at EY
• Breaking applications for a living
• Love to play with radio devices
• Licensed ham radio operator
https://abhijith.live
3
Twitter : @thoufeequens
https://abhijith.live
4
groot@hubot:~$ Significance of Automation and AI
• This is the age of Automation, Artificial Intelligence and Machine
learning.
• Even the most sophisticated tasks are being automated.
• Robotic process automation and NLP / AI based technologies are
emerging in the technology world
• Corporates finds it as a solution to cost cutting and as a smart way
of working
• AI is an area of interest all the time! We can say that Cognitive
Artificial Intelligence is very far from reality
• Big corporations are all behind AI technologies, to make the world a
better place
• Lets hope so!
• ELIZA bot
• Created on 1966 at MIT AI laboratory
• Used pattern matching and substitution methodology
• A.L.I.C.E bot
• Artificial Linguistic Internet Computer Entity
• Uses AIML (Artificial Intelligence Markup Language)
• New generation chat bots
• Quite powerful, uses machine learning and powerful AI algorithms
https://abhijith.live
5
groot@hubot:~$ Chat Bots? The history!
https://abhijith.live
6
groot@hubot:~$ ChatOps, DevOps and SecOps
Essentially it can be defined as,
Including tools and services within the conversation itself!
https://abhijith.live
7
groot@hubot:~$ ChatOps, DevOps and SecOps
Some popular names in the ChatOps industry
https://abhijith.live
8
Why can’t we use ChatOps for Security
testing?
• Command vs Natural language
• Project team/Dev team does not need to know the complex testing
scenarios
• More productivity
• Use Multiple API services (Scanners, other security services) from
different vendors
• A virtual assistant only for security or penetration testing;
• We can treat this bot as a person with huge amount of knowledge
about information security;
https://abhijith.live
9
groot@hubot:~$ Benefits
• The same infosec chat bot can be helpful for both security testers and
project/development teams
• Helps the security testers to save time and concentrate more on other
important stuff
• It helps the Project/developer teams with the security policies,
remediation plans etc
https://abhijith.live
10
groot@hubot:~$ Benefits
https://abhijith.live
11
Automation of web application
security testing:
Mostly the boring tasks!
What to automate?
How to automate?
Why do we have to automate?
• Pen-testing as a profession, we will have to repeat a lot of boring
tasks in daily basis.
• Automation of complex corporate security policies and rules
• So just automate the most boring and repetitive tasks
• Sometimes it takes a lot of time to answer the queries of Project
teams and developers
• Most of the queries will be about the secure development policies or
how to fix previously found vulnerabilities
• Why can’t be automate this?
• Automation of pen-testing and other manual tasks
https://abhijith.live
12
groot@hubot:~$ What to automate?
• Automation scripts or methodologies in various languages
• API for cyber security services
• Write custom automation scripts for manual testing
• Finally link all of these to the NLP/AI chat bot
https://abhijith.live
13
groot@hubot:~$ How to automate?
• It saves time and improves productivity.
• If we can automate something, why should we waste time
to do it manually every time?
https://abhijith.live
14
groot@hubot:~$ Why do we have to automate?
• We’ve looked for a few bots which can actually do “stuff”
• Some of them are as follows
https://abhijith.live
15
groot@hubot:~$ Finding the best bot for our purpose
COG bot
• After the comparison we decided to go with
Hubot
• An open source Chat bot made by GitHub
• It was used in GitHub company chat room to
automate things
• Hubot comes with a small set of core scripts
• Written using CoffeeScript on Nodejs
• Easily deployable to wide set of platforms
such as Slack, Heroku etc
https://abhijith.live
16
groot@hubot:~$ What exactly is Hubot?
H U B O T
Commissioned by GitHub
• Open source and ultimately free
• User permissions and roles can be set for both
Hubot and Rocket chat
• Sensitive command execution privileges can
be limited based on users and roles
• Rocket chat web interface is lean and
responsive
• Rocket chat supports AD authentication
• Which makes it perfect for internal use
• Highly Extensible
• We can access internal chat servers using VPN
https://abhijith.live
17
groot@hubot:~$ Advantages of using Hubot with Rocket chat
+
groot@hubot:~$ Recipe for the perfect bot
https://abhijith.live
18
https://abhijith.live
19
groot@hubot:~$ Let’s start building our bot
Image rights belongs to Hubot/GitHub
• Where to look :
• Github.com/hubot-scripts
• NPM – hubot-scripts
• Digg deep enough – Because, we are
damn lazy to write all required
scripts from the scratch
• A great collection of hubot-scripts
are already out there for information
security
• We can just use it or modify it as per
our requirements
https://abhijith.live
20
groot@hubot:~$ Scraping the existing Hubot scripts
Keep digging till you find it
• CoffeeScript can be used to create new scripts to increase the
functionality of our bot
• We wrote a few; rented a few
• Created a bunch of scripts to automate manual testing scenarios
https://abhijith.live
21
groot@hubot:~$ Creating new scripts for security testing
• Yes, we can integrate Python and Bash scripts into our chat
bot
• Which means a wide variety of web security testing or
automation scripts can be invoked using simple human like
interaction
• Just imagine the possibilities
https://abhijith.live
22
groot@hubot:~$ Using Python and Bash scripts
https://abhijith.live
23
We named our chat bot, Sheru!
Sheru is a dumb tiger in Malayalam comics,
who obeys the commands of his friend – a
tricky fox!
Let’s hope our bot – ‘Sheru’ is much
intelligent than the tiger!
https://abhijith.live
24
It’s Demo time!!
• We tried to make our bot, talk Human!
• But, Integrating with Artificial Intelligence API services
will make it much powerful
• Hubot will send every query to these API services before
executing them
• Its not something which we need in a security testing bot
• Solution is to create an exception and send the unsolved
queries by Hubot to online AI libraries
• It will not send sensitive queries to API services and helps
the bot to obtain more Human like behaviour
https://abhijith.live
25
groot@hubot:~$ What’s next?
• AI / NLP API services
https://abhijith.live
26
groot@hubot:~$ What’s next?
https://abhijith.live
27
groot@hubot:~$ Security concerns
• The chat bot server (Kali Linux) must use less privileged
user accounts
• Please make sure, only a limited number of users have
access to execute shell and other external scripts
• For internal use its better to use AD/LDAP authentication
for chat room users
• If we are targeting developer teams as well, make sure
they have only execute commands regarding policies; and
cannot invoke any pentesting automation scripts
• Authentication, Authorization, Accounting
https://abhijith.live
28
https://abhijith.live
29
Shoot your queries!
https://abhijith.live
30
Thank you all!
Thank you #BsidesDelhi
https://abhijith.live
31
References:
https://hubot.github.com/
https://abhijith.live
https://nodejs.org
https://npmjs.com
https://rocket.chat
https://abhijith.live/infosec-bot-using-hubot/
Thanks to our friend @boney for giving a hand with internal automation scripts
All image rights goes to respective owners
Ad

Recommended

AtlasCamp 2014: Hipchat Add-ons for the Atlassian Marketplace
AtlasCamp 2014: Hipchat Add-ons for the Atlassian Marketplace
Atlassian
 
First steps with Bitcoin
First steps with Bitcoin
Horea Porutiu
 
Hacking into gas stations : Cocon security conference
Hacking into gas stations : Cocon security conference
Suraj Pratap
 
Static Application Security Testing Strategies for Automation and Continuous ...
Static Application Security Testing Strategies for Automation and Continuous ...
Kevin Fealey
 
Aws(in)security - the devil is in the detail
Aws(in)security - the devil is in the detail
Pawel Rzepa
 
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
ITCamp
 
Bot. You said bot? Let build bot then! - Laurent Ellerbach
Bot. You said bot? Let build bot then! - Laurent Ellerbach
ITCamp
 
Global Azure2021 Verona.pptx
Global Azure2021 Verona.pptx
Luis Beltran
 
Accemy Chatbots expertise
Accemy Chatbots expertise
Accemy Software Solutions Pvt Ltd.
 
Getting Started with ChatGPT.pdf
Getting Started with ChatGPT.pdf
Manish Chopra
 
Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...
Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...
Antti Koskela
 
Automation in iOS development
Automation in iOS development
Cong Nguyen
 
GitHub Copilot.pptx
GitHub Copilot.pptx
Luis Beltran
 
GitHub Actions in Action MEAP V03 Michael Kaufmann
GitHub Actions in Action MEAP V03 Michael Kaufmann
marasnoskeu7
 
Pure APIs: Development workflows for successful API integrations
Pure APIs: Development workflows for successful API integrations
José Haro Peralta
 
Citizen Developer Tools @ Valo Solutions / Blue Meteorite Monday session
Citizen Developer Tools @ Valo Solutions / Blue Meteorite Monday session
Antti Koskela
 
Learning GitHub Actions 1 / converted Edition Brent Laster
Learning GitHub Actions 1 / converted Edition Brent Laster
nojokojufri
 
Learning GitHub Actions 1 / converted Edition Brent Laster
Learning GitHub Actions 1 / converted Edition Brent Laster
gheibialle
 
Revolutionize Your Workflow with ChatOps
Revolutionize Your Workflow with ChatOps
Tessa Mero
 
Documentation-driven development for Python web APIs v2
Documentation-driven development for Python web APIs v2
José Haro Peralta
 
Modern Web 2016: Using Golang to build a smart IM Bot
Modern Web 2016: Using Golang to build a smart IM Bot
Evan Lin
 
Github for Serious Business Professional
Github for Serious Business Professional
zwheller
 
SendGrid documentation & open source projects
SendGrid documentation & open source projects
SendGrid JP
 
Filipe Barroso - Google Developers Group - OSL19
Filipe Barroso - Google Developers Group - OSL19
marketingsyone
 
Using Chatbots in Extension Programming
Using Chatbots in Extension Programming
Amy Cole
 
Create Your Own Chatbot with Hubot and CoffeeScript
Create Your Own Chatbot with Hubot and CoffeeScript
Rob Scaduto
 
AOC hacktoberfest meetup 2024. An open-source event
AOC hacktoberfest meetup 2024. An open-source event
autumnofcodeindia
 
Design meets presentation November 2013
Design meets presentation November 2013
laurawesley
 
AC_Manufacturer_Strategy_Commercial_Government.pptx
AC_Manufacturer_Strategy_Commercial_Government.pptx
ajajsain
 
Political Polarization And Government Accountability.pptx
Political Polarization And Government Accountability.pptx
EverlyseLumantas
 

More Related Content

Similar to Automating web application security testing using Hubot AI / NLP chat bot - BSides Delhi (20)

Accemy Chatbots expertise
Accemy Chatbots expertise
Accemy Software Solutions Pvt Ltd.
 
Getting Started with ChatGPT.pdf
Getting Started with ChatGPT.pdf
Manish Chopra
 
Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...
Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...
Antti Koskela
 
Automation in iOS development
Automation in iOS development
Cong Nguyen
 
GitHub Copilot.pptx
GitHub Copilot.pptx
Luis Beltran
 
GitHub Actions in Action MEAP V03 Michael Kaufmann
GitHub Actions in Action MEAP V03 Michael Kaufmann
marasnoskeu7
 
Pure APIs: Development workflows for successful API integrations
Pure APIs: Development workflows for successful API integrations
José Haro Peralta
 
Citizen Developer Tools @ Valo Solutions / Blue Meteorite Monday session
Citizen Developer Tools @ Valo Solutions / Blue Meteorite Monday session
Antti Koskela
 
Learning GitHub Actions 1 / converted Edition Brent Laster
Learning GitHub Actions 1 / converted Edition Brent Laster
nojokojufri
 
Learning GitHub Actions 1 / converted Edition Brent Laster
Learning GitHub Actions 1 / converted Edition Brent Laster
gheibialle
 
Revolutionize Your Workflow with ChatOps
Revolutionize Your Workflow with ChatOps
Tessa Mero
 
Documentation-driven development for Python web APIs v2
Documentation-driven development for Python web APIs v2
José Haro Peralta
 
Modern Web 2016: Using Golang to build a smart IM Bot
Modern Web 2016: Using Golang to build a smart IM Bot
Evan Lin
 
Github for Serious Business Professional
Github for Serious Business Professional
zwheller
 
SendGrid documentation & open source projects
SendGrid documentation & open source projects
SendGrid JP
 
Filipe Barroso - Google Developers Group - OSL19
Filipe Barroso - Google Developers Group - OSL19
marketingsyone
 
Using Chatbots in Extension Programming
Using Chatbots in Extension Programming
Amy Cole
 
Create Your Own Chatbot with Hubot and CoffeeScript
Create Your Own Chatbot with Hubot and CoffeeScript
Rob Scaduto
 
AOC hacktoberfest meetup 2024. An open-source event
AOC hacktoberfest meetup 2024. An open-source event
autumnofcodeindia
 
Design meets presentation November 2013
Design meets presentation November 2013
laurawesley
 
Getting Started with ChatGPT.pdf
Getting Started with ChatGPT.pdf
Manish Chopra
 
Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...
Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...
Antti Koskela
 
Automation in iOS development
Automation in iOS development
Cong Nguyen
 
GitHub Copilot.pptx
GitHub Copilot.pptx
Luis Beltran
 
GitHub Actions in Action MEAP V03 Michael Kaufmann
GitHub Actions in Action MEAP V03 Michael Kaufmann
marasnoskeu7
 
Pure APIs: Development workflows for successful API integrations
Pure APIs: Development workflows for successful API integrations
José Haro Peralta
 
Citizen Developer Tools @ Valo Solutions / Blue Meteorite Monday session
Citizen Developer Tools @ Valo Solutions / Blue Meteorite Monday session
Antti Koskela
 
Learning GitHub Actions 1 / converted Edition Brent Laster
Learning GitHub Actions 1 / converted Edition Brent Laster
nojokojufri
 
Learning GitHub Actions 1 / converted Edition Brent Laster
Learning GitHub Actions 1 / converted Edition Brent Laster
gheibialle
 
Revolutionize Your Workflow with ChatOps
Revolutionize Your Workflow with ChatOps
Tessa Mero
 
Documentation-driven development for Python web APIs v2
Documentation-driven development for Python web APIs v2
José Haro Peralta
 
Modern Web 2016: Using Golang to build a smart IM Bot
Modern Web 2016: Using Golang to build a smart IM Bot
Evan Lin
 
Github for Serious Business Professional
Github for Serious Business Professional
zwheller
 
SendGrid documentation & open source projects
SendGrid documentation & open source projects
SendGrid JP
 
Filipe Barroso - Google Developers Group - OSL19
Filipe Barroso - Google Developers Group - OSL19
marketingsyone
 
Using Chatbots in Extension Programming
Using Chatbots in Extension Programming
Amy Cole
 
Create Your Own Chatbot with Hubot and CoffeeScript
Create Your Own Chatbot with Hubot and CoffeeScript
Rob Scaduto
 
AOC hacktoberfest meetup 2024. An open-source event
AOC hacktoberfest meetup 2024. An open-source event
autumnofcodeindia
 
Design meets presentation November 2013
Design meets presentation November 2013
laurawesley
 

Recently uploaded (20)

AC_Manufacturer_Strategy_Commercial_Government.pptx
AC_Manufacturer_Strategy_Commercial_Government.pptx
ajajsain
 
Political Polarization And Government Accountability.pptx
Political Polarization And Government Accountability.pptx
EverlyseLumantas
 
ENGLISh.pptxENGLISh.pptxENGLISh.pptxENGLISh.pptx
ENGLISh.pptxENGLISh.pptxENGLISh.pptxENGLISh.pptx
MervieJadeBabao
 
Josaya - Abstract for the research of the youth development.pdf
Josaya - Abstract for the research of the youth development.pdf
Josaya Injesi
 
Bob Stewart Acts 18 06 18 2025.pptx
Bob Stewart Acts 18 06 18 2025.pptx
FamilyWorshipCenterD
 
ENGLISh.pptxtausug.pptxtausug.pptxtausug.pptx
ENGLISh.pptxtausug.pptxtausug.pptxtausug.pptx
MervieJadeBabao
 
Section 4 - Islamic Civilization & Culture.pptx
Section 4 - Islamic Civilization & Culture.pptx
MianMuhammadUbaidUll
 
What say you - ethical issues in research
What say you - ethical issues in research
ssuser8aff01
 
Analysis of Tausog Language English.pptx
Analysis of Tausog Language English.pptx
MervieJadeBabao
 
Joy In The Journey 06 22 2025.pptx
Joy In The Journey 06 22 2025.pptx
FamilyWorshipCenterD
 
2025-06-22 Abraham 04 (shared slides).pptx
2025-06-22 Abraham 04 (shared slides).pptx
Dale Wells
 
FL Studio Crack Full Version [Latest 2025]
FL Studio Crack Full Version [Latest 2025]
Jackson lithms
 
Heating_Effect_of_Solar_Corona_Presentation.pptx
Heating_Effect_of_Solar_Corona_Presentation.pptx
Hanumamshukla
 
Pitch deck for any business presentation.pptx
Pitch deck for any business presentation.pptx
mukeshpurohit991
 
Itinerary ROHIS SMUNIC diperlukan untuk acara.pptx
Itinerary ROHIS SMUNIC diperlukan untuk acara.pptx
lukmanjavalatte
 
PEN TO PODIUM powerpoint presentation.pptx
PEN TO PODIUM powerpoint presentation.pptx
Vanessa accad
 
Google Algorithm Updates – A Complete Guide for Digital Marketing Students.pdf
Google Algorithm Updates – A Complete Guide for Digital Marketing Students.pdf
Nithinks37
 
Joint Family And Nuclear Family to .. pdf.
Joint Family And Nuclear Family to .. pdf.
shrujapanchal813
 
Japan's Media and Telecom Markets: Evolution, Global Competition, and NTT Law...
Japan's Media and Telecom Markets: Evolution, Global Competition, and NTT Law...
Toshiya Jitsuzumi
 
Briefing on the upcoming UNFSS +4 Stocktake
Briefing on the upcoming UNFSS +4 Stocktake
Francois Stepman
 
AC_Manufacturer_Strategy_Commercial_Government.pptx
AC_Manufacturer_Strategy_Commercial_Government.pptx
ajajsain
 
Political Polarization And Government Accountability.pptx
Political Polarization And Government Accountability.pptx
EverlyseLumantas
 
ENGLISh.pptxENGLISh.pptxENGLISh.pptxENGLISh.pptx
ENGLISh.pptxENGLISh.pptxENGLISh.pptxENGLISh.pptx
MervieJadeBabao
 
Josaya - Abstract for the research of the youth development.pdf
Josaya - Abstract for the research of the youth development.pdf
Josaya Injesi
 
Bob Stewart Acts 18 06 18 2025.pptx
Bob Stewart Acts 18 06 18 2025.pptx
FamilyWorshipCenterD
 
ENGLISh.pptxtausug.pptxtausug.pptxtausug.pptx
ENGLISh.pptxtausug.pptxtausug.pptxtausug.pptx
MervieJadeBabao
 
Section 4 - Islamic Civilization & Culture.pptx
Section 4 - Islamic Civilization & Culture.pptx
MianMuhammadUbaidUll
 
What say you - ethical issues in research
What say you - ethical issues in research
ssuser8aff01
 
Analysis of Tausog Language English.pptx
Analysis of Tausog Language English.pptx
MervieJadeBabao
 
Joy In The Journey 06 22 2025.pptx
Joy In The Journey 06 22 2025.pptx
FamilyWorshipCenterD
 
2025-06-22 Abraham 04 (shared slides).pptx
2025-06-22 Abraham 04 (shared slides).pptx
Dale Wells
 
FL Studio Crack Full Version [Latest 2025]
FL Studio Crack Full Version [Latest 2025]
Jackson lithms
 
Heating_Effect_of_Solar_Corona_Presentation.pptx
Heating_Effect_of_Solar_Corona_Presentation.pptx
Hanumamshukla
 
Pitch deck for any business presentation.pptx
Pitch deck for any business presentation.pptx
mukeshpurohit991
 
Itinerary ROHIS SMUNIC diperlukan untuk acara.pptx
Itinerary ROHIS SMUNIC diperlukan untuk acara.pptx
lukmanjavalatte
 
PEN TO PODIUM powerpoint presentation.pptx
PEN TO PODIUM powerpoint presentation.pptx
Vanessa accad
 
Google Algorithm Updates – A Complete Guide for Digital Marketing Students.pdf
Google Algorithm Updates – A Complete Guide for Digital Marketing Students.pdf
Nithinks37
 
Joint Family And Nuclear Family to .. pdf.
Joint Family And Nuclear Family to .. pdf.
shrujapanchal813
 
Japan's Media and Telecom Markets: Evolution, Global Competition, and NTT Law...
Japan's Media and Telecom Markets: Evolution, Global Competition, and NTT Law...
Toshiya Jitsuzumi
 
Briefing on the upcoming UNFSS +4 Stocktake
Briefing on the upcoming UNFSS +4 Stocktake
Francois Stepman
 
Ad

Automating web application security testing using Hubot AI / NLP chat bot - BSides Delhi

  • 1. https://abhijith.live 1 Automating Web Application Security Testing Using Hubot Artificial Intelligence Chat Bot Abhijith B R / @abhijithbr Thoufeeque N S / @thoufeequens #BsidesDelhi2017
  • 2. :~$ whoami • Abhijith B R • Sr. Security analyst at EY • Traveller and Blogger https://abhijith.live 2 I do blog : https://abhijith.live Twitter : @abhijithbr
  • 3. :~$ whoami • Thoufeeque N S • Security analyst at EY • Breaking applications for a living • Love to play with radio devices • Licensed ham radio operator https://abhijith.live 3 Twitter : @thoufeequens
  • 4. https://abhijith.live 4 groot@hubot:~$ Significance of Automation and AI • This is the age of Automation, Artificial Intelligence and Machine learning. • Even the most sophisticated tasks are being automated. • Robotic process automation and NLP / AI based technologies are emerging in the technology world • Corporates finds it as a solution to cost cutting and as a smart way of working • AI is an area of interest all the time! We can say that Cognitive Artificial Intelligence is very far from reality • Big corporations are all behind AI technologies, to make the world a better place • Lets hope so!
  • 5. • ELIZA bot • Created on 1966 at MIT AI laboratory • Used pattern matching and substitution methodology • A.L.I.C.E bot • Artificial Linguistic Internet Computer Entity • Uses AIML (Artificial Intelligence Markup Language) • New generation chat bots • Quite powerful, uses machine learning and powerful AI algorithms https://abhijith.live 5 groot@hubot:~$ Chat Bots? The history!
  • 6. https://abhijith.live 6 groot@hubot:~$ ChatOps, DevOps and SecOps Essentially it can be defined as, Including tools and services within the conversation itself!
  • 7. https://abhijith.live 7 groot@hubot:~$ ChatOps, DevOps and SecOps Some popular names in the ChatOps industry
  • 9. • Command vs Natural language • Project team/Dev team does not need to know the complex testing scenarios • More productivity • Use Multiple API services (Scanners, other security services) from different vendors • A virtual assistant only for security or penetration testing; • We can treat this bot as a person with huge amount of knowledge about information security; https://abhijith.live 9 groot@hubot:~$ Benefits
  • 10. • The same infosec chat bot can be helpful for both security testers and project/development teams • Helps the security testers to save time and concentrate more on other important stuff • It helps the Project/developer teams with the security policies, remediation plans etc https://abhijith.live 10 groot@hubot:~$ Benefits
  • 11. https://abhijith.live 11 Automation of web application security testing: Mostly the boring tasks! What to automate? How to automate? Why do we have to automate?
  • 12. • Pen-testing as a profession, we will have to repeat a lot of boring tasks in daily basis. • Automation of complex corporate security policies and rules • So just automate the most boring and repetitive tasks • Sometimes it takes a lot of time to answer the queries of Project teams and developers • Most of the queries will be about the secure development policies or how to fix previously found vulnerabilities • Why can’t be automate this? • Automation of pen-testing and other manual tasks https://abhijith.live 12 groot@hubot:~$ What to automate?
  • 13. • Automation scripts or methodologies in various languages • API for cyber security services • Write custom automation scripts for manual testing • Finally link all of these to the NLP/AI chat bot https://abhijith.live 13 groot@hubot:~$ How to automate?
  • 14. • It saves time and improves productivity. • If we can automate something, why should we waste time to do it manually every time? https://abhijith.live 14 groot@hubot:~$ Why do we have to automate?
  • 15. • We’ve looked for a few bots which can actually do “stuff” • Some of them are as follows https://abhijith.live 15 groot@hubot:~$ Finding the best bot for our purpose COG bot
  • 16. • After the comparison we decided to go with Hubot • An open source Chat bot made by GitHub • It was used in GitHub company chat room to automate things • Hubot comes with a small set of core scripts • Written using CoffeeScript on Nodejs • Easily deployable to wide set of platforms such as Slack, Heroku etc https://abhijith.live 16 groot@hubot:~$ What exactly is Hubot? H U B O T Commissioned by GitHub
  • 17. • Open source and ultimately free • User permissions and roles can be set for both Hubot and Rocket chat • Sensitive command execution privileges can be limited based on users and roles • Rocket chat web interface is lean and responsive • Rocket chat supports AD authentication • Which makes it perfect for internal use • Highly Extensible • We can access internal chat servers using VPN https://abhijith.live 17 groot@hubot:~$ Advantages of using Hubot with Rocket chat +
  • 18. groot@hubot:~$ Recipe for the perfect bot https://abhijith.live 18
  • 19. https://abhijith.live 19 groot@hubot:~$ Let’s start building our bot Image rights belongs to Hubot/GitHub
  • 20. • Where to look : • Github.com/hubot-scripts • NPM – hubot-scripts • Digg deep enough – Because, we are damn lazy to write all required scripts from the scratch • A great collection of hubot-scripts are already out there for information security • We can just use it or modify it as per our requirements https://abhijith.live 20 groot@hubot:~$ Scraping the existing Hubot scripts Keep digging till you find it
  • 21. • CoffeeScript can be used to create new scripts to increase the functionality of our bot • We wrote a few; rented a few • Created a bunch of scripts to automate manual testing scenarios https://abhijith.live 21 groot@hubot:~$ Creating new scripts for security testing
  • 22. • Yes, we can integrate Python and Bash scripts into our chat bot • Which means a wide variety of web security testing or automation scripts can be invoked using simple human like interaction • Just imagine the possibilities https://abhijith.live 22 groot@hubot:~$ Using Python and Bash scripts
  • 23. https://abhijith.live 23 We named our chat bot, Sheru! Sheru is a dumb tiger in Malayalam comics, who obeys the commands of his friend – a tricky fox! Let’s hope our bot – ‘Sheru’ is much intelligent than the tiger!
  • 25. • We tried to make our bot, talk Human! • But, Integrating with Artificial Intelligence API services will make it much powerful • Hubot will send every query to these API services before executing them • Its not something which we need in a security testing bot • Solution is to create an exception and send the unsolved queries by Hubot to online AI libraries • It will not send sensitive queries to API services and helps the bot to obtain more Human like behaviour https://abhijith.live 25 groot@hubot:~$ What’s next?
  • 26. • AI / NLP API services https://abhijith.live 26 groot@hubot:~$ What’s next?
  • 27. https://abhijith.live 27 groot@hubot:~$ Security concerns • The chat bot server (Kali Linux) must use less privileged user accounts • Please make sure, only a limited number of users have access to execute shell and other external scripts • For internal use its better to use AD/LDAP authentication for chat room users • If we are targeting developer teams as well, make sure they have only execute commands regarding policies; and cannot invoke any pentesting automation scripts • Authentication, Authorization, Accounting