| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
JavaSecLab is a comprehensive Java vulnerability lab for application security learning, code audit practice, secure development training, and security tool evaluation. Built on Spring Boot, it provides vulnerable code, fixed implementations, realistic attack scenarios, audit-oriented source and sink notes, remediation guidance, secure coding explanations, and traffic-analysis examples.
The goal is practical: help users understand not only how a vulnerability is exploited, but also why it exists in code and how it should be fixed.
JavaSecLab covers a wide range of Java web security scenarios, including:
Demo site: http://whgojp.top/
Default account: admin/admin
JavaSecLab is intentionally vulnerable and contains dangerous endpoints, vulnerable dependencies, and insecure configurations. Run your own deployment only in an isolated environment. Do not expose it directly to the public internet.
The author has worked in enterprise security roles and experienced the full vulnerability lifecycle. After penetration tests or security assessments, vulnerabilities are often assigned to development teams through systems such as TAPD or Jira. In practice, two questions come up repeatedly:
JavaSecLab was created to connect vulnerability behavior, vulnerable code, remediation approaches, and audit thinking. Compared with a text-only report or a PoC, the project emphasizes understanding vulnerabilities from the code perspective.
In code auditing, a common workflow is to locate a sink first, such as command execution, SQL execution, file access, template rendering, deserialization, or response output. The auditor then traces backward to identify the corresponding source, such as request parameters, headers, cookies, uploaded files, serialized data, or database content. Many JavaSecLab scenarios are designed around this source-to-sink path, making them useful for both learning and tool verification.
The same vulnerability type often appears through multiple trigger paths in real systems. JavaSecLab therefore provides multiple scenarios for core vulnerability classes where possible, so users can compare how different coding patterns, framework features, and business flows affect risk.
JavaSecLab includes vulnerability traffic-analysis examples to help learners connect request/response behavior with code execution. Contributions with clearer packets, better reproduction notes, or additional analysis examples are welcome.
For example, in a time-based SQL injection scenario, the traffic pattern can be observed through response latency: the server responds after roughly five seconds.
Clone the repository:
git clone https://github.com/whgojp/JavaSecLab.git
cd JavaSecLabRequirements:
Create the database and import sql/JavaSecLab.sql.
Set the active profile to dev in src/main/resources/application.yml:
spring:
profiles:
active: devUpdate the database connection in src/main/resources/application-dev.yml:
username: root
password: QWE123qwe
url: jdbc:mysql://localhost:13306/JavaSecLab?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=trueStart the application from IDEA or with Maven.
Default account: admin/admin
Requirements:
Build and start the lab:
mvn clean package -DskipTests
docker-compose -p javaseclab up -dIf the database is empty after startup, manually import sql/JavaSecLab.sql.
For more deployment options and troubleshooting notes, see the Deployment Guide.
JavaSecLab is a vulnerable lab project. It intentionally keeps dangerous endpoints, vulnerable dependencies, and insecure configurations for reproduction and teaching. Run it only locally or in an isolated network.
Recommended precautions:
The secure code examples in this project are for teaching and demonstration. Real business systems usually require authentication, auditing, rate limiting, data validation, dependency governance, monitoring, alerting, and defense in depth.
Issues and pull requests are welcome. Good contributions include:
When we speak of free software, we are referring to freedom, not price.
JavaSecLab is released under the Apache License 2.0. See LICENSE for details.
See the Update Log for release notes and project history.
Author's blog: 今天是几号
If you are interested in application security, secure development, SDL, DevSecOps, or vulnerability labs, feel free to join the community group.
If JavaSecLab helps you, sponsorship is appreciated. Support will be used for maintaining the online environment and continuously improving the project.
| Back | FazBrowse Home | New Git URL |