Code Monkey home page Code Monkey logo

java-sec-code's Introduction

Java Security Code

介绍

该项目也可以叫做Java Vulnerability Code(Java漏洞代码)。

每个漏洞类型代码默认存在安全漏洞(除非本身不存在漏洞),相关修复代码在注释里。具体可查看每个漏洞代码和注释。

漏洞代码

漏洞说明

如何运行

Tomcat

  1. 生成war包 mvn clean package
  2. 将target目录的war包,cp到Tomcat的webapps目录
  3. 重启Tomcat应用
http://localhost:8080/java-sec-code-1.0.0/rce/exec?cmd=whoami

返回

Viarus

IDEA

如果想在IDEA中直接运行,需要在IDEA中添加Tomcat配置,步骤如下:

Run -> Edit Configurations -> 添加TomcatServer(Local) -> Server中配置Tomcat路径 -> Deployment中添加Artifact选择java-sec-code:war exploded

tomcat

配置完成后,右上角直接点击run,即可运行。

http://localhost:8080/rce/exec?cmd=whoami

返回

Viarus

有人反馈不想额外下载Tomcat,想使用SpringBoot自带的Tomcat,所以额外说明。

具体操作:执行cp pom-idea.xml pom.xml后,最后在IDEA中右键Run Application

Jar包

有人反馈想直接打Jar包运行。具体操作:

先修改pom.xml里的配置,将war改成jar

    <groupId>sec</groupId>
    <artifactId>java-sec-code</artifactId>
    <version>1.0.0</version>
    <packaging>war</packaging>

再打包运行即可。

mvn clean package -DskipTests 
java -jar 打包后的jar包路径

java-sec-code's People

Contributors

joychou93 avatar lightless233 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.