title: HackTheBox-Previse author: Mosaic Theory layout: true categories: 漏洞实验 tags:
• 打靶日记
Walking the road of life is like climbing a mountain. It seems to take many wrong roads and rough roads, but eventually it will reach the top of the mountain.
走人生的路就像爬山一样,看起来走了许多冤枉的路,崎岖的路,但最终会到达山顶。
HackTheBox-Previse
Recon:
Starting masscan 1.3.2 (http://bit.ly/14GZzcT) at 2022-05-17 06:22:37 GMT
Initiating SYN Stealth Scan
Scanning 1 hosts [131070 ports/host]
Discovered open port 80/tcp on 10.10.11.104
Discovered open port 22/tcp on 10.10.11.104
Nmap scan report for 10.10.11.104
Host is up (0.16s latency).
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 53:ed:44:40:11:6e:8b:da:69:85:79:c0:81:f2:3a:12 (RSA)
| 256 bc:54:20:ac:17:23:bb:50:20:f4:e1:6e:62:0f:01:b5 (ECDSA)
|_ 256 33:c1:89:ea:59:73:b1:78:84:38:a4:21:10:0c:91:d8 (ED25519)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
| http-cookie-flags:
| /:
| PHPSESSID:
|_ httponly flag not set
|_http-server-header: Apache/2.4.29 (Ubuntu)
| http-title: Previse Login
|_Requested resource was login.php
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 15.49 seconds
>> whatweb http://previse.htb
http://previse.htb [302 Found] Apache[2.4.29], Cookies[PHPSESSID], Country[RESERVED][ZZ], HTML5, HTTPServer[Ubuntu Linux][Apache/2.4.29 (Ubuntu)], IP[10.10.11.104], Meta-Author[m4lwhere], RedirectLocation[login.php], Script, Title[Previse Home]
都会被重定向:
>> dirsearch -u http://previse.htb -e php
_|. _ _ _ _ _ _|_ v0.4.2
(_||| _) (/_(_|| (_| )
Extensions: php | HTTP method: GET | Threads: 30 | Wordlist size: 8940
Output File: /home/mosaictheory/.dirsearch/reports/previse.htb/_22-05-17_14-32-48.txt
Error Log: /home/mosaictheory/.dirsearch/logs/errors-22-05-17_14-32-48.log
Target: http://previse.htb/
[14:33:11] 302 - 4KB - /accounts.php -> login.php
[14:33:25] 200 - 0B - /config.php
[14:33:27] 301 - 308B - /css -> http://previse.htb/css/
[14:33:29] 302 - 0B - /download.php -> login.php
[14:33:31] 200 - 15KB - /favicon.ico
[14:33:31] 302 - 5KB - /files.php -> login.php
[14:33:31] 200 - 217B - /footer.php
[14:33:32] 200 - 980B - /header.php
[14:33:34] 302 - 3KB - /index.php -> login.php
[14:33:34] 302 - 3KB - /index.php/login/ -> login.php
[14:33:35] 200 - 1KB - /js/
[14:33:35] 301 - 307B - /js -> http://previse.htb/js/
[14:33:38] 200 - 2KB - /login.php
[14:33:38] 302 - 0B - /logout.php -> login.php
[14:33:49] 403 - 276B - /server-status
[14:33:49] 403 - 276B - /server-status/
[14:33:52] 302 - 3KB - /status.php -> login.php
浏览器访问会被重定向,但是curl是可以捕获到目标正常响应页面的:
>> curl http://previse.htb
DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Previse rocks your socks." />
<meta name="author" content="m4lwhere" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="stylesheet" href="css/uikit.min.css" />
<script src="js/uikit.min.js">script>
<script src="js/uikit-icons.min.js">script>
<title>Previse Hometitle>
head>
<body>
<nav class="uk-navbar-container" uk-navbar>
<div class="uk-navbar-center">
<ul class="uk-navbar-nav">
<li class="uk-active"><a href="/index.php">Homea>li>
<li>
<a href="accounts.php">ACCOUNTSa>
<div class="uk-navbar-dropdown">
<ul class="uk-nav uk-navbar-dropdown-nav">
<li><a href="accounts.php">CREATE ACCOUNTa>li>
ul>
div>
li>
<li><a href="files.php">FILESa>li>
<li>
<a href="status.php">MANAGEMENT MENUa>
<div class="uk-navbar-dropdown">
<ul class="uk-nav uk-navbar-dropdown-nav">
<li><a href="status.php">WEBSITE STATUSa>li>
<li><a href="file_logs.php">LOG DATAa>li>
ul>
div>
li>
<li><a href="#" class=".uk-text-uppercase">span>a>li>
<li>
<a href="logout.php">
<button class="uk-button uk-button-default uk-button-small">LOG OUTbutton>
a>
li>
ul>
div>
nav>
<section class="uk-section uk-section-default">
<div class="uk-container">
<h2 class="uk-heading-divider">Previse File Hostingh2>
<p>Previse File Hosting Service Management.p>
<p>Don't have an account? Create one!