btslab官方介绍:
BTS PenTesting Lab is an open source vulnerable web application, created by Cyber Security & Privacy Foundation (www.cysecurity.org). It can be used to learn about many different types of web application vulnerabilities.
Currently, the app contains the following types of vulnerabilities:
(机翻)BTS PenTesting Lab是一个开源易受攻击的网络应用程序,由网络安全与隐私基金会(www.cysecurity.org)创建。它可以用来了解许多不同类型的web应用程序漏洞。
目前,该应用程序包含以下类型的漏洞:
- SQL Injection
- XSS(includes Flash Based xss)
- CSRF
- Clickjacking
- SSRF
- File Inclusion
- Code Execution
- Insecure Direct Object Reference
- Unrestricted File Upload vulnerability
- Open URL Redirection
- Server Side Includes(SSI) Injection and more…
btslab安装:
下载小编提供的源码,或https://github.com/CSPF-Founder/btslab/releases/tag/0.1 访问下载,我们利用phpstudy进行搭建。
在phpstudy的www 的根目录下创建名称为btslab的文件夹,把下载的源码放入该文件夹中,修改config.php 数据库配置文件,默认账户密码root root
通过本机ip访问地址:127.0.0.1或者通过ipconfig查看本地如:192.168.x.x(防止后期抓包问题),访问 http://127.0.0.1/btslab/setup.php 地址点击setup,返回 The webApp has been installed successfully 即可安装成功。
如果成功后返回如下页面,说明php拓展或者mysql版本支持问题,小编在这里修改setup.php,文件代码如下
<?php include($_SERVER['DOCUMENT_ROOT'].'/btslab/header.php'); ?> <?php include($_SERVER['DOCUMENT_ROOT'].'/btslab/config.php'); if(isset($_POST['install'])) { if($_POST['install']==1) { $con=mysqli_connect($db_server,$db_user,$db_password) or die("Connection Failure: ".mysqli_error()); //mysqli connection //Database creation mysqli_query("DROP DATABASE IF EXISTS $db_name") or die("Can't drop database".mysqli_error()); mysqli_query("CREATE DATABASE $db_name") or die("creating database fails".mysqli_error()); mysqli_select_db($db_name,$con); //User Table creation $sql="Create table users(ID int NOT NULL AUTO_INCREMENT, username varchar(30),email varchar(60), password varchar(40), about varchar(50),privilege varchar(20),avatar TEXT,primary key (id))"; mysqli_query($sql) or die("Failed to create Users Table".mysqli_error()); $hashedpassword=sha1("password"); mysqli_query("INSERT into users(username, password, email,About,avatar, privilege) values ('admin','$hashedpassword','admin@localhost','I am the admin of this page','default.jpg','admin')") or die("Not able to insert values".mysqli_error());; //Posts table creation mysqli_query("create table posts(postid int NOT NULL AUTO_INCREMENT, content TEXT,title varchar(100), user varchar(30), primary key (postid))") or die("Failed to create Posts Table".mysqli_error()); mysqli_query("INSERT into posts(content,title, user) values ('Feel free to ask any questions about BTS Lab','First Post', 'admin')") or die("Failed to insert post".mysqli_error()); mysqli_query("create table tdata(id int, page varchar(30))") or die("Failed to create tdata Table<br/>".mysqli_error()); mysqli_query("Insert into tdata values(1,'ext1.html')"); mysqli_query("Insert into tdata values(2,'ext2.html')"); //Messages Table Creation $sql="Create table Messages(msgid int NOT NULL AUTO_INCREMENT,name varchar(30),email varchar(60), msg varchar(500),primary key (msgid))"; mysqli_query($sql) or die("Failed to create Messages Table".mysqli_error()); mysqli_query("INSERT into Messages(name,email, msg) values ('TestUser','Test@localhost', 'Hi admin, how are you')") or die("Failed to insert Messages".mysqli_error()); echo "<script>alert('The webApp has been installed successfully')</script> "; mysqli_close(); } } ?> <p> <form action="setup.php" method="post"> <input type="hidden" value="1" name="install"/> <input type="submit" value="Setup" name="setup"/> </form> </p> <br/> Note:<br/><b style="color:red">If a database already exits, it will be dropped </b> <?php include($_SERVER['DOCUMENT_ROOT'].'/btslab/footer.php'); ?>
之后访问首页,这样就成功了,快去快乐的玩耍吧。
1.本站上传的源码,均为平台购买,作者提供,网友推荐,互联网平台整理而来,请下载后24小时内删除。如有需要,请购买正版.
2.请勿利用文章内的相关技术从事非法测试,由于传播、利用此文所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,作者不为此承担任何责任。
3.站内资源若侵犯了您的合法权益,请指出本站立即改正。
4.上述内容仅供学习参考及技术交流之用,未经相关的知识产权权利人同意,用户不得进行商业使用。
5.保姆式服务,百分百售后!