0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

HackTheBox Writeup: Appointment

Posted at

概要

HackTheBox:Appointmentのflagを入手する手順を記す。

Port Scan

$ nmap -A -sV appointment.htb 
Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-15 10:35 EDT
Nmap scan report for appointment.htb (10.129.42.72)
Host is up (0.25s latency).
Not shown: 999 closed tcp ports (conn-refused)
PORT   STATE SERVICE VERSION
80/tcp open  http    Apache httpd 2.4.38 ((Debian))
|_http-title: Login
|_http-server-header: Apache/2.4.38 (Debian)

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 63.48 seconds

port 80でhttpを提供していることが分かる。

Port80にアクセスする

http://appointment.htb にアクセスすると以下のページが現れる。
index.png
admin/root/passwordで試してもログインできない。

SQL Injectionを試行する

有名所のSQL Injectionを試してみる。
以下の内容を試してみる。

  • Username : admin
  • Password : ' or '1'='1

最終的にこのInjectionは成功し、flagが画面に表示される。

SQL Injectionの中身について

先ほど行ったInjectionは以下の原理で成功する。

password='%s' 

となる部分の%sに

' or '1'='1

を代入すると

password='' or '1'='1'

という内容になり、条件式が常に真となってしまう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?