@@ -46,14 +46,14 @@ func getIP() string {
46
46
return localAddr .IP .String ()
47
47
}
48
48
49
- func sendRam (RHOST string , LPORT string ) {
49
+ func sendRam (RHOST string , LimePORT string ) {
50
50
fmt .Println ("[+] Sending RAM dump." )
51
51
52
52
// Prepare command
53
53
54
54
//cmd := exec.Command("/bin/bash", "-c", fmt.Sprintf("memdump -s 409600 > /dev/tcp/%s/%s", RHOST, RPORT)) // Used for tests
55
55
//cmd := exec.Command("/bin/bash", "-c", fmt.Sprintf("insmod -s 409600 > /dev/tcp/%s/%s", RHOST, RPORT)) // Used for lime tests
56
- cmd := exec .Command ("/bin/bash" , "-c" , fmt .Sprintf ("insmod /var/lib/dkms/lime-forensics/1.9.1-3/6.0.6-76060006-generic/x86_64/module/lime.ko \" path=tcp:%s format=lime\" " , LPORT )) // Used for lime tests
56
+ cmd := exec .Command ("/bin/bash" , "-c" , fmt .Sprintf ("insmod /var/lib/dkms/lime-forensics/1.9.1-3/6.0.6-76060006-generic/x86_64/module/lime.ko \" path=tcp:%s format=lime\" " , LimePORT )) // Used for lime tests
57
57
// cmd := exec.Command("/bin/bash", "-c", fmt.Sprintf("memdump > /dev/tcp/%s/%s", RHOST, RPORT)) // Used in production
58
58
59
59
// Execute command
@@ -66,7 +66,7 @@ func sendRam(RHOST string, LPORT string) {
66
66
exec .Command ("/bin/bash" , "-c" , "rmmod lime" ).Run ()
67
67
}
68
68
69
- func handleRequest (conn net.Conn , RHOST string , LPORT string ) {
69
+ func handleRequest (conn net.Conn , RHOST string , LimePORT string ) {
70
70
// incoming request
71
71
buffer := make ([]byte , 1024 )
72
72
read_len , err := conn .Read (buffer )
@@ -89,7 +89,7 @@ func handleRequest(conn net.Conn, RHOST string, LPORT string) {
89
89
} else {
90
90
conn .Write ([]byte ("OK" ))
91
91
fmt .Println ("[+] RAM dump requested" )
92
- sendRam (RHOST , LPORT )
92
+ sendRam (RHOST , LimePORT )
93
93
}
94
94
95
95
// close conn
@@ -163,7 +163,7 @@ func startServer(LPORT string, RHOST string, RPORT string, LimePORT string) {
163
163
log .Fatal (err )
164
164
os .Exit (1 )
165
165
}
166
- go handleRequest (conn , RHOST , LPORT )
166
+ go handleRequest (conn , RHOST , LimePORT )
167
167
}
168
168
}
169
169
0 commit comments