Skip to content

Commit 6f70323

Browse files
author
x2020
committed
Minor misspelling mistakes and corrected the check of the mysqld process
1 parent 1119dc4 commit 6f70323

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

documentation/modules/exploit/linux/local/mysql_priv_esc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
## Notes
33

4-
This exploit was tested on ubuntu 14 and 16. As it relays on log file location and service restarting, success on other linux distributions depends greatly.
4+
This exploit was tested on ubuntu 14 and 16. As it relies on log file location and service restarting, success on other linux distributions depends greatly.
55

66
## Creating A Testing Environment
77

@@ -78,7 +78,7 @@ This module was not tested against, but may work against:
7878

7979
**COMPILE**
8080

81-
If we should live compile on the system, or drop pre-created binaries. Auto will determine if gcc/libs are installed to compile live on the system. Defaults to Auto
81+
If we should live compile on the system, or drop pre-created binaries. `Auto` will determine if gcc/libs are installed to compile live on the system. Defaults to `Auto`
8282

8383
## Scenarios
8484

modules/exploits/linux/local/mysql_priv_esc.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ def check_reqs?()
6666
vprint_good "mysqld_safe is running"
6767
return true
6868
end
69-
vprint_error "mysqld process not running"
70-
true
69+
print_error "mysqld process not running"
70+
false
7171
end
7272

7373
def mysql_user?()
7474
# test for mysql user
7575
mysql = cmd_exec("id | grep -E '(mysql)'")
7676
if not mysql.include?("mysql")
77-
print_error "The current session user (#{mysql})is not mysql"
77+
print_error "The current session user (#{mysql}) is not mysql"
7878
return false
7979
end
8080
vprint_good "The current user is mysql"
@@ -115,7 +115,7 @@ def exploit
115115

116116
# first thing we need to do is determine our method of exploitation: compiling realtime, or droping a pre-compiled version.
117117
def has_prereqs?()
118-
vprint_status('Checking if gcc are installed')
118+
vprint_status('Checking if gcc is installed')
119119
if target.name == "Ubuntu"
120120
gcc = cmd_exec('which gcc')
121121
if gcc.include?('gcc')
@@ -167,6 +167,7 @@ def has_prereqs?()
167167
write_file(privesclib_file, privesclib)
168168
end
169169
register_file_for_cleanup(backdoorpath)
170+
register_file_for_cleanup(privesclib_file)
170171

171172
# the actual pwning
172173
def do_pwn(privesclib_file, suidbin, backdoorpath, payload_path)

0 commit comments

Comments
 (0)