Posts

Showing posts with the label Database

Web Server Hardening - MySQL

Image
MySQL Security In order to understand the possible attack can be done on MySQL, please read our write up for SQL Injection at http://www.axcelsec.com/2018/02/penetration-testing-with-owasp-top-10.html . SHOW DATABASES; USE MYSQL; SELECT * FROM user; SELECT Host,User,Password FROM user; CIS Benchmark 3. File System Permissions SHOW VARIABLES WHERE variable_name = 'datadir' OR variable_name = 'plugin_dir' OR #Plugin Directory variable_name LIKE 'log_bin_basename' OR variable_name LIKE 'log_error' OR variable_name LIKE 'slow_query_log_file' OR variable_name LIKE 'relay_log_basename' OR variable_name LIKE 'general_log_file' OR variable_name = 'ssl_key'; #SSL Key Files 4. General SHOW VARIABLES WHERE variable_name LIKE "version"; SHOW VARIABLES LIKE 'have_symlink'; #Ensure the Value returned is DISABLED. SHOW DATABASES LIKE 'test'; #Ensure that no rows are returned (Ensure the ...

Database Assessment - Tool

Image
Scuba Database Vulnerability Scanner Download link:  https://www.imperva.com/lg/lgw_trial.asp?pid=213 DBeaver - Free Universal SQL Client Official Website:   https://dbeaver.io/   Hint: Press Ctrl + Alt + End  to fetch all records for a SQL query To study more on manual database assessment , please read the following articles: Oracle: https://www.axcelsec.com/2017/12/database-assessment-oracle.html  PostgreSQL: https://www.axcelsec.com/2017/12/database-assessment-postgresql.html

Database Assessment - PostgreSQL

Version  psql -V  List of Databases psql -l Connect to database "postgres" psql -d postgres Information Gathering postgres=> select * from pg_user;  postgres=> select * from pg_roles;  postgres=> SHOW ALL;  postgres=> SELECT * FROM pg_settings;  postgres=> SELECT name,setting,unit,category,context,vartype,source,min_val,max_val,enumvals,boot_val,reset_val,sourcefile,sourceline,pending_restart FROM pg_settings;  postgres=> SHOW config_file; PostgreSQL configuration file (postgresql.conf) PostgreSQL Client Authentication Configuration File (pg_hba.conf) A. Client Authentication * Disable all trust connections, use strong authentication (md5/kerberos etc) Trust authentication is only suitable for TCP/IP connections if you trust every user on every machine that is allowed to connect to the server by the pg_hba.conf lines that specify trust. It is seldom reasonable to use trust for any TCP/IP connections...

Database Assessment - Oracle

Image
Assessment Query /** 1: Oracle Database Installation and Patching Requirements **/ SELECT * FROM DBA_USERS_WITH_DEFPWD; SELECT * FROM ALL_USERS; /** 2: Oracle Parameter Settings * Listener Settings * Database Settings **/ SELECT * FROM V$PARAMETER; /** 4.2 Database Settings **/ SELECT UPPER(VALUE) FROM V$PARAMETER WHERE UPPER(NAME) = 'AUDIT_SYS_OPERATIONS' OR UPPER(NAME) = 'AUDIT_TRAIL' OR UPPER(NAME) = 'GLOBAL_NAMES' OR UPPER(NAME) = 'LOCAL_LISTENER' OR UPPER(NAME) = 'O7_DICTIONARY_ACCESSIBILITY' OR UPPER(NAME) = 'OS_ROLES' OR UPPER(NAME) = 'REMOTE_LISTENER' OR UPPER(NAME) = 'REMOTE_LOGIN_PASSWORDFILE' OR UPPER(NAME) = 'REMOTE_OS_AUTHENT' OR UPPER(NAME) = 'REMOTE_OS_ROLES' OR UPPER(NAME) = 'UTL_FILE_DIR' OR UPPER(NAME) = 'SEC_CASE_SENSITIVE_LOGON' OR UPPER(NAME) = 'SEC_MAX_FAILED_LOGIN_ATTEMPTS' OR UPPER(NAME) = 'SEC_PROTOCOL_ERROR_FURTHER_ACTION' OR UPPER(NAME) ...

Popular posts from this blog

Remote Desktop Protocol (RDP) Security

Penetration Testing - Network

Damn Vulnerable Web Services (DVWS) - Walkthrough

Server Message Block (SMB) Security

Offensive Security Testing Guide

Host Configuration Assessment - Windows

Web Server Hardening - Apache Tomcat

Content Page

Mobile Penetration Testing - Android

Penetration Testing with OWASP Top 10 - 2017 A7 Cross-Site Scripting (XSS)