-
Notifications
You must be signed in to change notification settings - Fork 1
/
BaseGadgets.h
executable file
·56 lines (43 loc) · 957 Bytes
/
BaseGadgets.h
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
#ifndef BASEGADGETS_H
# define BASEGADGETS_H
#include "ROPGen.h"
class BaseGadgets : public ROPGen {
public:
BaseGadgets(uint cookieValue, uint slideValue,
const char* fileName, uint maxSize);
protected:
// nop
void nop();
// call function with blx
void callFunc(const char* symbol,
uint isThumb = TRUE);
// pivot (sp = r)
void pivot_r(uint reg);
// to use with new payload after pivot
void finish_pivot();
// used to pivot
void mov_sp_r4();
// pop r0-8
void pop(uint reg);
// mov
void mov(uint reg1, uint reg2);
// add
void add_r4_sp_r4();
// str
void str_r1__r4();
// lsrs r0
void lsrs_r0_r0_24();
void lsrs_r0_r0_16();
void lsrs_r0_r0_8();
// lsrs r1
void lsrs_r1_r1_8();
void lsrs_r1_r1_24();
void lsrs_r1_r1_28();
// lsls r1
void lsls_r1_r1_8();
// lsrs/lsls generic 8
void ls_r_8(char direction, uint reg);
// sub sp
void sub_sp();
};
#endif //BASEGADGETS_H