Skip to content

Commit

Permalink
Merge pull request Hardw01f#43 from Snow-HardWolf/docs/ModifyReadme
Browse files Browse the repository at this point in the history
Docs/modify readme
  • Loading branch information
Hardw01f authored Feb 6, 2020
2 parents fcd8c76 + 13c8ffd commit 73aadf8
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 2 deletions.
56 changes: 55 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,56 @@
# Vulnerability-goapp
Web application build Golang with Vulnerability
Vulnerable golang Web application for education

## Note
This application has some vulnerabilities
So, Use for educational or research purposes only

## Run-Environmant

- docker-compose
- golang
- Vulnerability Application
- CSRF-Trap Application
- MySQL

## Image

<img width="1784" alt="loginPage" src="https://user-images.githubusercontent.com/22651097/73920112-1f2f9700-4908-11ea-855d-573007d440e1.png">


## How to Run

#### docker-compose
1. cd Vulnerability-goapp
2. docker-compose up

#### Web Application
1. Access 'http://localhost:9090/login' on browser ( Google Chrome recommended )


#### CSRF-TRAP-Application
1. Access 'http://localhost:3030/scrftrap' on browser ( Google Chrome recommended )

*Note. CSRF will be expressed when you access this page, so please be careful when access this page*

### First Users

```
MailAddress: [email protected]
Password : Amuro,Ikima-su!
```

```
MailAddress: [email protected]
Password : AkaiSuisei
```

### Admin Pages

1. login some user and go top page
2. go 'http://localhost:9090/adminlogin'

```
AdminMailAddress: [email protected]
Password : Qwerty1234
```
4 changes: 3 additions & 1 deletion Trap/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"html/template"
"log"
"fmt"
"net/http"
)

Expand Down Expand Up @@ -34,4 +35,5 @@ func main() {
if err != nil {
log.Fatal("ListenAndServe: ", err)
}
}
fmt.Println("ListenPost : 3030")
}
39 changes: 39 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: "2"
services:

mysql:
image: mysql:5.6
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci
restart: always
environment:
MYSQL_ROOT_PASSWORD: rootwolf
MYSQL_PORT: 3306
ports:
- 3306:3306
volumes:
- ./runenv/mysql:/etc/mysql
- ./runenv/mysql-data/init.sql:/docker-entrypoint-initdb.d/grant.sql
container_name: vulnapp-mysql

goapp:
image: golang:1.13-alpine3.10
ports:
- 9090:9090
volumes:
- $PWD:/goapp
working_dir: /goapp
command: sh -c "apk add git mysql-client && go get github.com/go-sql-driver/mysql && go get golang.org/x/xerrors && go build -o vulnapp && ./vulnapp -p 9090"
depends_on:
- mysql
container_name: vulnapp-goapp

csrftrap:
image: golang:1.13-alpine3.10
ports:
- 3030:3030
volumes:
- $PWD:/goapp
working_dir: /goapp/Trap
command: sh -c "apk add git && go get github.com/go-sql-driver/mysql && go get golang.org/x/xerrors && go build -o trapapp && ./trapapp"
container_name: vulnapp-csrftrap

Binary file added img/loginPage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 73aadf8

Please sign in to comment.