Dataset Viewer
Auto-converted to Parquet Duplicate
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...
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 b...
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 Arbitr...
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 deb...
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 va...
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 ...
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 ...
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 i...
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 positio...
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...
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",...
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(l...
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 repre...
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...
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) #...
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...
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...
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 versi...
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 dom...
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): # functi...
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....
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=4...
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,dicti...
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() I...
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...
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 webpa...
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* - m...
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 ...
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 ...
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-...
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() d...
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....
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.co...
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...
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 a...
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. GN...
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 i...
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 SH...
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...
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').te...
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 insta...
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 Serv...
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.findal...
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 i...
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.InsecureRequestWar...
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="...
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 t...
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" App...
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(re...
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 Inte...
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 - DA...
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...
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+...
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...
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 isd...
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 ...
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...
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 configu...
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 ur...
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 ...
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...
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 ...
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 ...
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 secu...
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 think...
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 questi...
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 pro...
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 ...
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 samp...
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 par...
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'l...
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 ...
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 ...
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...
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 ...
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 bo...
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 espec...
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...
Bug.Bounty.Field.Manual
359
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
5