├── domains.txt ├── README.md ├── provider.json ├── main.go └── providerCreate.html /domains.txt: -------------------------------------------------------------------------------- 1 | facebook.com 2 | twitter.com 3 | gmail.com 4 | hackerone.com 5 | bugcrowd.com 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Inception 2 | **Inception** is a highly configurable tool to check for whatever you like against any number of hosts. 3 | 4 | Inception is a Go version of [Snallygaster](https://github.com/hannob/snallygaster) and comes with a large number of test cases derived from Snallygaster plus more, added by me. 5 | 6 | What differentiate Inception from Snallygaster is- it allows users to create & provide their own test cases without touching a single line of code. 7 | 8 | The use of goroutine makes it very fast but it doesn't hammer a single domain concurrently with a large number of requests. 9 | 10 | ### Installation 11 | Just make sure you have go installed and run the following command. 12 | ```sh 13 | go get github.com/proabiral/inception 14 | ``` 15 | 16 | ### Usage 17 | ``` 18 | ▶️ inception -h 19 | Usage of inception: 20 | -d string 21 | Path of list of domains to run against (default "/home/user/go/src/github.com/proabiral/inception/domains.txt") 22 | -provider string 23 | Path of provider file (default "/home/user/go/src/github.com/proabiral/inception/provider.json") 24 | -t int 25 | No of threads (default 200) 26 | -timeout int 27 | HTTP request Timeout (default 10) 28 | -v Verbose mode 29 | ``` 30 | 31 | #### Examples 32 | ``` 33 | ▶️ inception -d /path/to/domainlist.txt 34 | Issue detected : Server status is publicly viewable http://127.0.0.1/server-status response contains all check 35 | Issue detected : PHP info is publicly viewable http://127.0.0.1/phpinfo.php response contains all check 36 | Completed 37 | ``` 38 | All detected issues will be printed on screen as shown above. While if no issue is detected, a completion message is shown as `Completd`. 39 | 40 | ### FAQs 41 | Q. How should my domain list look like? 42 | A sample of domain list is provided with the tool. It's basically a list of line seperated domains without no protocol. 43 | ``` 44 | facebook.com 45 | twitter.com 46 | gmail.com 47 | hackerone.com 48 | bugcrowd.com 49 | ``` 50 | 51 | Q. How do I add my own test cases? 52 | You can use [providerCreate.html](https://proabiral.github.io/inception/providerCreate.html) to generate JSON. Just fill in the details and JSON as shown below will be generated. 53 | ``` 54 | [ 55 | { 56 | "vulnerability":"Git Exposed publicly", 57 | "sendIn":"url", 58 | "payload":["/.git/config"], 59 | "checkIn":"responseBody", 60 | "checkFor":"[core]", 61 | "color":"red" 62 | }, 63 | { 64 | "vulnerability": "XSS", 65 | "sendIn": "url", 66 | "color": "red", 67 | "payload": [ 68 | "/?canary'\">" 69 | ], 70 | "checkIn": "responseBody", 71 | "checkFor": "" 72 | } 73 | ] 74 | ``` 75 | Save the generated JSON to some file and then run the tool by providing the path to the json file with `-provider` option: 76 | ``` 77 | ▶️ inception -provider /path/to/your/provider.json -d /path/to/your/domainlist.txt 78 | ``` 79 | 80 | Q. Whats with the name? 81 | The name of tool is inspired from the movie Inception where DiCaprio steals secrets from subconscious mind of people. Similar to movie, this tool steal secrets from webserver. 82 | Also, `inception` because this is the first tool I am open sourcing. 83 | 84 | ### TODO 85 | 1. Add more vulnerability checks 86 | 2. Implement ReGex search in Response 87 | 3. Add key to each test case in provider.json and option to select/ignore a test case 88 | 4. Output result to file 89 | 5. Randomize User-Agent 90 | 6. Code refactor 91 | 92 | ## Thanks 93 | Thanks to [Iceman](https://twitter.com/Ice3man543) for reviewing the tool and suggesting this cool name. 94 | Also concurrency module has been shamelessly stolen from his [Subover project](https://github.com/Ice3man543/SubOver) 95 | 96 | -------------------------------------------------------------------------------- /provider.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "vulnerability":"PHP info is publicly viewable", 4 | "sendIn":"url", 5 | "payload":["/php.php","/phpinfo.php","/info.php"], 6 | "checkIn":"responseBody", 7 | "checkFor":"PHP Extension&&&&PHP API&&&&PHP Version", 8 | "color":"red" 9 | }, 10 | { 11 | "vulnerability":"Server status is publicly viewable", 12 | "sendIn":"url", 13 | "payload":["/server-status"], 14 | "checkIn":"responseBody", 15 | "checkFor":"Apache Server Status&&&&Server Version&&&&CPU Usage:", 16 | "color":"yellow" 17 | }, 18 | { 19 | "vulnerability":"Git Exposed publicly", 20 | "sendIn":"url", 21 | "payload":["/.git/config"], 22 | "checkIn":"responseBody", 23 | "checkFor":"[core]", 24 | "color":"red" 25 | }, 26 | { 27 | "vulnerability": "Lazy File Manager", 28 | "sendIn": "url", 29 | "payload": [ 30 | "/lfm.php" 31 | ], 32 | "checkIn": "responseBody", 33 | "checkFor": "Lazy File Manager", 34 | "color": "blue" 35 | }, 36 | { 37 | "vulnerability": "IntelliJ IDEA WebServer config file", 38 | "sendIn": "url", 39 | "payload": [ 40 | "/.idea/WebServers.xml" 41 | ], 42 | "checkIn": "responseBody", 43 | "checkFor": "name=\"WebServers\"", 44 | "color": "red" 45 | }, 46 | { 47 | "vulnerability": "Symfony Database Config File", 48 | "sendIn": "url", 49 | "payload": [ 50 | "/config/databases.yml" 51 | ], 52 | "checkIn": "responseBody", 53 | "checkFor": "param:&&&&class:", 54 | "color": "red" 55 | }, 56 | { 57 | "vulnerability": "Rails Database Config file", 58 | "sendIn": "url", 59 | "payload": [ 60 | "/config/database.yml" 61 | ], 62 | "checkIn": "responseBody", 63 | "checkFor": "database:&&&&adapter:", 64 | "color": "red" 65 | }, 66 | { 67 | "vulnerability": "wsFTP ini File", 68 | "sendIn": "url", 69 | "payload": [ 70 | "/WS_FTP.ini", 71 | "/ws_ftp.ini", 72 | "/WS_FTP.INI" 73 | ], 74 | "checkIn": "responseBody", 75 | "checkFor": "[_config_]", 76 | "color": "red" 77 | }, 78 | { 79 | "vulnerability": "Filezilla config file", 80 | "sendIn": "url", 81 | "payload": [ 82 | "/filezilla.xml", 83 | "/sitemanager.xml", 84 | "/FileZilla.xml" 85 | ], 86 | "checkIn": "responseBody", 87 | "checkFor": " 2 | 3 | 4 | 5 |
Header Name Header Value

" 11 | 12 | const PayloadBodyDiv="
Endpoint where request will be send:

" 13 | 14 | const responseBodyDivS="


What to check for in Response Body

" 15 | 16 | const responseBodyDiv="
What to check for in Response Body {Case Sensitive ; Leave empty if you want to only send request}

" 17 | 18 | 19 | const responseHeaderDivS="


What to check for in Response Header

" 20 | 21 | const responseHeaderDiv="
What to check for in Response Header {Case Sensitive ; Leave empty if you want to only send request}

" 22 | 23 | function changeOption(xoxo){ 24 | document.querySelectorAll(".delimiter").forEach(function(element) {element.selectedIndex=xoxo.selectedIndex}) 25 | } 26 | 27 | function payloadBody(){ 28 | if(document.getElementById('sendIn').value == "header") { 29 | document.querySelector("#payloadDiv").innerHTML=PayloadHeaderDiv; 30 | document.getElementById('minusbuttonID').style="display:none" 31 | } 32 | else{ 33 | document.querySelector("#payloadDiv").innerHTML=PayloadBodyDiv 34 | } 35 | } 36 | 37 | 38 | function responseDiv(){ 39 | if(document.getElementById('checkIn').value == "responseHeader") { 40 | document.querySelector("#responseDiv").innerHTML=responseHeaderDiv; 41 | document.getElementById('minusbuttonID').style="display:none" 42 | } 43 | else{ 44 | document.querySelector("#responseDiv").innerHTML=responseBodyDiv 45 | } 46 | } 47 | 48 | jsonIndex=0 49 | function jsonGenerator() { 50 | 51 | json[jsonIndex]=new Object(); 52 | json[jsonIndex].vulnerability=document.querySelector("#vulnerability").value 53 | json[jsonIndex].sendIn=document.querySelector("#sendIn").value 54 | json[jsonIndex].color=document.querySelector("#color").value 55 | json[jsonIndex].payload=new Array(); 56 | // json[0].payload[0]=document.querySelector("#payload").value 57 | 58 | x=document.querySelectorAll("#payloadDiv input[type=\"text\"]") 59 | for (var i = 0; i < x.length; i++) { 60 | json[jsonIndex].payload[i]=x[i].value; 61 | } 62 | 63 | json[jsonIndex].checkIn=document.querySelector("#checkIn").value 64 | 65 | y=document.querySelectorAll(".response") 66 | 67 | json[jsonIndex].checkFor="" 68 | 69 | document.querySelector("#sendIn").value 70 | 71 | if(document.getElementById('checkIn').value == "responseBody") { 72 | for (var i=0; i < y.length; i++){ 73 | if (i==0){ 74 | json[jsonIndex].checkFor=y[i].value 75 | } 76 | else if (y[i].value !== ""){ 77 | delimiter=document.querySelector(".delimiter").value 78 | json[jsonIndex].checkFor=y[i].value+delimiter+json[jsonIndex].checkFor 79 | } 80 | } 81 | } 82 | 83 | else{ 84 | for (var i=0; i < y.length; i+=2){ 85 | if (i==0){ 86 | json[jsonIndex].checkFor=y[i].value+": "+y[i+1].value 87 | } 88 | else if (y[i].value !== ""){ 89 | delimiter=document.querySelector(".delimiter").value 90 | json[jsonIndex].checkFor=y[i].value+": "+y[i+1].value+delimiter+json[jsonIndex].checkFor 91 | } 92 | } 93 | } 94 | 95 | } 96 | 97 | function addPayloadField() { 98 | if(document.getElementById('sendIn').value == "header") { 99 | document.querySelector("#payloadDiv").insertAdjacentHTML("beforeend",PayloadHeaderDiv) 100 | } 101 | 102 | else{ 103 | document.querySelector("#payloadDiv").insertAdjacentHTML("beforeend",PayloadBodyDiv) 104 | } 105 | } 106 | 107 | function addResponseField(){ 108 | if(document.getElementById('checkIn').value == "responseBody") { 109 | document.querySelector("#responseDiv").insertAdjacentHTML("beforeend",responseBodyDivS) 110 | } 111 | else{ 112 | document.querySelector("#responseDiv").insertAdjacentHTML("beforeend",responseHeaderDivS) 113 | } 114 | document.querySelectorAll(".delimiter").forEach(function(element) {element.selectedIndex=document.querySelector('.delimiter').selectedIndex}) 115 | } 116 | 117 | function minusButton(xoxo){ 118 | xoxo.parentElement.parentElement.removeChild(xoxo.parentElement) 119 | } 120 | 121 | function vulnerabilityIsEmpty(){ 122 | if (document.forms[0].vulnerability.value=="") { 123 | alert("fill up the vulnerability details") 124 | return true 125 | } 126 | else{ 127 | return false 128 | } 129 | } 130 | 131 | 132 | function payloadIsEmpty(){ 133 | var payloadFieldArray=document.querySelectorAll(".payload") 134 | for (var i = 0; i < payloadFieldArray.length; i++) { 135 | if (payloadFieldArray[i].value==""){ 136 | alert("fill up all payload section") 137 | return true 138 | } 139 | else{ 140 | return false 141 | } 142 | } 143 | } 144 | 145 | function isNotEmpty(){ 146 | if (!vulnerabilityIsEmpty() && !payloadIsEmpty()){ 147 | return true 148 | } 149 | } 150 | 151 | 152 | function saveValue(){ 153 | 154 | } 155 | 156 | function moreVulnerability(xoxo){ 157 | if (isNotEmpty()){ 158 | console.log("works") 159 | jsonGenerator(); 160 | jsonIndex++; 161 | 162 | previousValueCheckIn = document.querySelector("#checkIn").value 163 | previousValueSendIn = document.querySelector("#sendIn").value 164 | 165 | if (document.querySelector(".delimiter")){ 166 | previousID = document.querySelector(".delimiter").selectedIndex 167 | } 168 | xoxo.form.reset(); 169 | document.querySelector("#checkIn").value = previousValueCheckIn 170 | document.querySelector("#sendIn").value = previousValueSendIn 171 | 172 | document.querySelectorAll(".delimiter").forEach(function(element) {element.selectedIndex=previousID}) 173 | document.querySelector('#jsonOutput').value=JSON.stringify(json, null, 4) 174 | document.getElementById('hint').innerText=hintText; 175 | } 176 | } 177 | 178 | 179 | function jsonPrint(xoxo){ 180 | if (isNotEmpty()){ 181 | jsonGenerator() 182 | 183 | previousValueCheckIn = document.querySelector("#checkIn").value 184 | previousValueSendIn = document.querySelector("#sendIn").value 185 | 186 | xoxo.form.reset() 187 | 188 | document.querySelector("#checkIn").value = previousValueCheckIn 189 | document.querySelector("#sendIn").value = previousValueSendIn //restoring to previous value 190 | 191 | document.querySelector('#jsonOutput').value=JSON.stringify(json, null, 4) 192 | } 193 | } 194 | 195 | 196 | 197 | 198 |

199 | Create json file for provider 200 |

201 | 202 |
203 | Vulnerability Name: 204 |

205 | 206 | Send payload in: 207 |

211 | 212 |
213 |
214 | Endpoint where request will be send: 215 |

216 |
217 |
218 | 219 | Check in 220 |

224 | 225 |
226 |
227 | What to check for in Response Body {Case Sensitive ; Leave empty if you want to only send request}

228 |
229 |
230 | 231 | Severity to Assign 232 |
237 | 238 | 239 | 240 |
241 |

242 | 243 | 244 | 245 |
246 | 247 |
248 | 249 | 252 | 253 | 254 | 255 | 256 | 257 | 268 | 269 | 270 | --------------------------------------------------------------------------------