Lucene search
+L

Check MySQL User Privileges

🗓️ 01 Dec 2025 12:51:31Reported by KittySploitType 
kittysploit
 kittysploit
🔗 kittysploit.com👁 1 Views

The KittySploit MySQLClient module checks current MySQL user privileges and capabilities.

Refs
Code
from kittysploit import *
from lib.protocols.mysql.mysql_client import MySQLClient

class Module(Post, MySQLClient):

	__info__ = {
		"name": "Check MySQL User Privileges",
		"description": "Check current MySQL user privileges and capabilities",
		"author": "KittySploit Team",
		"session_type": SessionType.MYSQL,
	'agent': {
	    'risk': 'intrusive',
	    'effects': ['active_exploitation'],
	    'expected_requests': 2,
	    'reversible': False,
	    'approval_required': True,
	    'produces': ['risk_signals'],
	    'cost': 1.5,
	    'noise': 0.5,
	    'value': 1.0,
	    'requires': 	    {'min_endpoints': 0,
	     'min_params': 0,
	     'tech_hints_any': [],
	     'tech_hints_all': [],
	     'specializations_any': [],
	     'risk_signals_any': [],
	     'auth_session': False,
	     'capabilities_any': [],
	     'capabilities_all': [],
	     'confidence_min': {},
	     'confidence_min_any': {},
	     'endpoint_pattern_any': [],
	     'param_any': [],
	     'api_surface_ready': False},
	    'chain': 	    {'produces_capabilities': [{'capability': 'db_access', 'from_detail': ''}],
	     'consumes_capabilities': ['shell'],
	     'option_bindings': {},
	     'suggested_followups': []},
	},
	}	

	def run(self):
		try:
			user = self.get_current_user()
			if user:
				print_info(f"Current User: {user}")
			
			grants = self.execute_query("SHOW GRANTS")
			print_info("Grants:")
			for grant in grants:
				print_info(f"  {list(grant.values())[0]}")
			
			privileges_to_check = [
				'FILE', 'SUPER', 'PROCESS', 'RELOAD', 'SHUTDOWN',
				'CREATE USER', 'GRANT OPTION', 'REPLICATION SLAVE',
				'REPLICATION CLIENT', 'CREATE ROUTINE', 'ALTER ROUTINE',
				'CREATE TABLESPACE', 'CREATE VIEW', 'SHOW VIEW',
				'TRIGGER', 'EVENT', 'CREATE', 'DROP', 'INSERT',
				'UPDATE', 'DELETE', 'SELECT', 'ALTER'
			]
			
			print_info("Detailed Privileges:")
			for priv in privileges_to_check:
				has_priv = self.check_privilege(priv)
				if has_priv:
					print_success(f"{priv} is granted")
				else:
					print_error(f"{priv} is not granted")
			
			secure_file_priv = self.get_secure_file_priv()
			if secure_file_priv == '' or secure_file_priv is None:
				print_success("File operations possible (secure_file_priv is empty)")
			print_info(f"secure_file_priv: {secure_file_priv}")
			plugin_dir = self.get_plugin_dir()
			print_info(f"Plugin Directory: {plugin_dir}")
			return True
			
		except Exception as e:
			print_error(f"Error checking privileges: {e}")
			return False

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

02 Aug 2026 20:51Current
5.8Medium risk
Vulners AI Score5.8
1