File tree 2 files changed +17
-3
lines changed
2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,13 @@ Commands:
53
53
54
54
I tried at first some heap exploitation stuff but it didn't work.
55
55
The easier thing to do is to use the READ operation to write inside the address of
56
- ` modprobe_path ` a different binary to execute. To write the value you use
57
- the pid of the process.
56
+ ` modprobe_path ` a different string (which is the name of the program to be executed
57
+ when a binary format file is not recognized). To write the value you use
58
+ the pid of the process. From my understanding this works because the module uses
59
+ ` copy_user_generic_unrolled ` instead of ` copy_to_user ` to copy the value.
58
60
59
61
I tried to set instead of ` /tmp/a ` ` ~/aa ` , but ` modprobe_path ` doesn't seem to understand
60
62
the ` ~ ` (in this way it could be possible to write two consecutive write without looping
61
63
through all the possible pid three times)
62
64
63
- At the moment the exploit is without ` KASLR ` .
65
+ At the moment the exploit works without ` KASLR ` .
Original file line number Diff line number Diff line change @@ -10,6 +10,18 @@ struct len_pid {
10
10
}
11
11
12
12
struct string * storages [16 ]; // global
13
+
14
+ __int64 __fastcall put_user_size (__int64 a1 , __int64 a2 )
15
+ {
16
+ int v3 ; // [rsp+0h] [rbp-Ch] BYREF
17
+ unsigned __int64 v4 ; // [rsp+4h] [rbp-8h]
18
+
19
+ _fentry__ (a1 , a2 );
20
+ v3 = a1 ;
21
+ v4 = __readgsqword (0x28u );
22
+ return copy_user_generic_unrolled (a2 , & v3 );
23
+ }
24
+
13
25
__int64 __fastcall pprofile_ioctl (__int64 a1 , __int64 a2 )
14
26
{
15
27
__int64 v2 ; // rdx
You can’t perform that action at this time.
0 commit comments