// Thanks to @pqlqpql
#include <linux/io_uring.h>
#include <sys/capability.h>
#include <sys/syscall.h>
struct user_cap_data_struct {
uint32_t effective;
uint32_t permitted;
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
use std::fs::File; | |
use std::fs::{OpenOptions}; | |
use std::io::{Read}; | |
//use std::mem::{size_of, transmute}; | |
/* | |
typedef struct | |
{ | |
unsigned char e_ident[EI_NIDENT]; // Magic number and other info | |
Elf64_Half e_type; // Object file type |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <sys/mman.h> | |
#include <assert.h> | |
#include <sys/ioctl.h> |
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
; https://github.com/n4sm/AD_1DA/tree/master/AD_1DA | |
BITS 64 | |
section .text | |
global _start | |
_start: | |
mov r13, 0x1111111111111111 |
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
inline int rol (int in, int x) { | |
int res; | |
__asm__ __volatile__("rol %%eax, %%cl" :"=a"(res) :"a"(in), "c"(x)); | |
return res; | |
} | |
inline int ror (int in, int x) { | |
int res; | |
__asm__ __volatile__("ror %%eax, %%cl" :"=a"(res) :"a"(in), "c"(x)); |
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
/* | |
An example of using raw sockets. | |
You can capture packets by tcpdump: | |
tcpdump -X -s0 -i lo -p udp | |
*/ | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <stdio.h> |
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
/* | |
* This file is part of the XXX distribution (https://github.com/xxxx or http://xxx.github.io). | |
* Copyright (c) 2015 Liviu Ionescu. | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, version 3. | |
* | |
* This program is distributed in the hope that it will be useful, but | |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
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
#include <stdint.h> //for int8_t | |
#include <string.h> //for memcmp | |
#include <wmmintrin.h> //for intrinsics for AES-NI | |
//compile using gcc and following arguments: -g;-O0;-Wall;-msse2;-msse;-march=native;-maes | |
//internal stuff | |
//macros | |
#define DO_ENC_BLOCK(m,k) \ | |
do{\ |
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
/* credits to http://blog.techorganic.com/2015/01/04/pegasus-hacking-challenge/ */ | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <netinet/in.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#define REMOTE_ADDR "XXX.XXX.XXX.XXX" | |
#define REMOTE_PORT XXX |
NewerOlder