XSS实践

虚拟机IP为什么会变?

备份官方yum源配置文件

官方yum源配置文件在:

/etc/yum.repos.d/CentOS-Base.repo

里面的内容:

cat /etc/yum.repos.d/CentOS-Base.repo

备份命令:

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

下载阿里云源配置,覆盖原文件

命令:

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

再次查看内容:

cat /etc/yum.repos.d/CentOS-Base.repo

CentOS网络配置文件

输入命令(复制以后在终端里面Shift+Insert粘贴):

cd /etc/sysconfig/network-scripts/ifcfg-ens33

按回车打开配置文件。

重启网络

网络配置文件修改以后需要重启网络才能生效,命令:(重要!每次修改了ens33文件都要重启网络)

service network restart

XSS TargetMachine

on 192.168.23.154

install phpstudy

请用浏览器访问面板:

外网:http://119.3.119.253:9080/2C5022

内网:http://192.168.23.154:9080/2C5022

系统初始账号:admin

系统初始密码:xO65Kmys8u

官网:https://www.xp.cn

如果使用的是云服务器,请至安全组开放9080端口

如果使用ftp,请开放21以及30000-30050端口

cd /www/admin/localhost_80/wwwroot

http://192.168.23.154:80/DVWA/setup.php

username: admin

password: password

pikachu

开始攻击

xsser -u "http://192.168.23.154/DVWA/vulnerabilities/" -g "xss_r/?name=XSS" --cookie="PHPSESSID=26fff236515ad941079dbf9d; security=low" -s -v --reverse-check

https://installati.one/install-python3-selenium-kalilinux/

Install python3-selenium Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python3-selenium using apt-get by running the following command:

sudo apt-get -y install python3-selenium

最终执行成功

XSStriker

python3 xsstrike.py -u "http://192.168.23.154/pikachu/vul/xss/xss_reflected_get.php?message=1&submit=submit"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值