Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/main/resources/static/** linguist-vendored
src/main/resources/templates/** linguist-vendored
35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ JavaSecLab is a comprehensive Java vulnerability lab for application security le

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.

![home](./pic/home.png)
![home](./pic/home-en.png)

![show](./pic/show.png)
![show](./pic/show-en.png)

## Who Is It For?

Expand Down Expand Up @@ -67,7 +67,7 @@ The same vulnerability type often appears through multiple trigger paths in real

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.

![flow1](./pic/flow1.png)
![flow1](./pic/flow1-en.png)

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.

Expand Down Expand Up @@ -123,7 +123,7 @@ Requirements:

Default account: `admin/admin`

![login](./pic/login.png)
![login](./pic/login-en.png)

### Docker Deployment

Expand All @@ -132,11 +132,17 @@ Requirements:
- Docker
- Docker Compose

Build and start the lab:
Option 1: start with the published image:

```shell
docker compose -f docker-compose.image.yml up -d
```

Option 2: build the image locally and start the lab:

```shell
mvn clean package -DskipTests
docker-compose -p javaseclab up -d
docker compose -p javaseclab up -d
```

If the database is empty after startup, manually import [sql/JavaSecLab.sql](./sql/JavaSecLab.sql).
Expand Down Expand Up @@ -177,6 +183,23 @@ Issues and pull requests are welcome. Good contributions include:

JavaSecLab is released under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0). See [LICENSE](./LICENSE) for details.

## Star History

<picture>
<source
media="(prefers-color-scheme: dark)"
srcset="https://api.star-history.com/svg?repos=whgojp/JavaSecLab&type=Date&theme=dark"
/>
<source
media="(prefers-color-scheme: light)"
srcset="https://api.star-history.com/svg?repos=whgojp/JavaSecLab&type=Date"
/>
<img
alt="Star History Chart"
src="https://api.star-history.com/svg?repos=whgojp/JavaSecLab&type=Date"
/>
</picture>

## Changelog

See the [Update Log](https://github.com/whgojp/JavaSecLab/wiki/%E6%9B%B4%E6%96%B0%E6%97%A5%E5%BF%97) for release notes and project history.
Expand Down
27 changes: 25 additions & 2 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,17 @@ cd JavaSecLab
- Docker
- Docker Compose

构建并启动:
方式一:直接使用已发布镜像启动:

```shell
docker compose -f docker-compose.image.yml up -d
```

方式二:本地构建镜像并启动:

```shell
mvn clean package -DskipTests
docker-compose -p javaseclab up -d
docker compose -p javaseclab up -d
```

如果容器启动后数据库为空,请手动导入 [sql/JavaSecLab.sql](./sql/JavaSecLab.sql)。
Expand Down Expand Up @@ -177,6 +183,23 @@ JavaSecLab 为漏洞靶场项目,包含故意保留的危险接口、漏洞依

本项目遵循 [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0) 协议,详细内容请参见 [LICENSE](./LICENSE)。

## Star History

<picture>
<source
media="(prefers-color-scheme: dark)"
srcset="https://api.star-history.com/svg?repos=whgojp/JavaSecLab&type=Date&theme=dark"
/>
<source
media="(prefers-color-scheme: light)"
srcset="https://api.star-history.com/svg?repos=whgojp/JavaSecLab&type=Date"
/>
<img
alt="Star History Chart"
src="https://api.star-history.com/svg?repos=whgojp/JavaSecLab&type=Date"
/>
</picture>

## 更新记录

项目详细更新记录见:[更新日志](https://github.com/whgojp/JavaSecLab/wiki/%E6%9B%B4%E6%96%B0%E6%97%A5%E5%BF%97)
Expand Down
39 changes: 39 additions & 0 deletions docker-compose.image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: "3"

services:
mysql:
image: mysql:8.0.33
container_name: Container-MYSQL8
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: QWE123qwe
MYSQL_DATABASE: JavaSecLab
volumes:
- ./sql/JavaSecLab.sql:/docker-entrypoint-initdb.d/JavaSecLab.sql
networks:
- JavaSecLabNet

JavaSecLab:
image: whgojp/javaseclab:1.5
container_name: Container-JavaSecLab
restart: always
ports:
- 80:80
environment:
- TZ=Asia/Shanghai
- SPRING_PROFILES_ACTIVE=docker
depends_on:
- mysql
volumes:
- ./logs:/logs
networks:
- JavaSecLabNet

networks:
JavaSecLabNet:
driver: bridge
ipam:
config:
- subnet: 192.168.1.0/24
Loading
Loading