mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #2159] oracle old version #1446
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#1446
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jackpit110 on GitHub (Jun 25, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2159
oracle client 9
pass: hashcat
oracle client 9.zip
@magnumripper commented on GitHub (Jun 26, 2016):
Your link give me a 404.
Are you saying you'd want Oracle 9 supported? Is it different from Oracle 10? Is it still in use anywhere?
@jackpit110 commented on GitHub (Jun 27, 2016):
it is common in networks to see old versions and may be it would be useful for downgrading.i dont like miss something.
ettercat is not working on this cap file.
another thing is that in oracle protocol some times we can find windows hashes.
i think it is 10. i dont know.
ora9.zip
@magnumripper commented on GitHub (Jun 28, 2016):
OK I can add support to Ettercap (for a starter) once we sort out what we need.
So this looks like client v 9.2.0.1.0 talking to server 11.2.0.1.0 and I see an AUTH_SESSKEY of E24A4529CB34F719E9D3F1B331771D29 and an AUTH_PASSWORD of 8C09DD6E50EBD24CA1626B0AC5FAC36B. Is this the older case-insensitive DES-based encryption? Do you have any references? The ekoparty PDF mentions 32-byte AUTH_SESSKEY for 10g auth but this is just half of that (after decoding hex). Maybe they got it wrong (they are wrong in some other details) and meant 32-byte hex string.
@magnumripper commented on GitHub (Jun 28, 2016):
https://dl.packetstormsecurity.net/papers/database/oracle-interrupted.pdf
HOWTO Secure and Audit Oracle 10g and 11g - Ron Ben-Natan(earlier link was broken)@jackpit110 commented on GitHub (Jun 28, 2016):
yes .
thc programs does not match to this passwords too.
check this cap file with "SCOTTSCOTTSCOTTSCOTT" as password
ora9_2.zip
Edit: these are not valid passwords in database
@jackpit110 commented on GitHub (Jun 29, 2016):
3des
http://docslide.us/documents/oracle-tns-3des-check.html
@jfoug commented on GitHub (Aug 24, 2016):
Here is a checker (had to search a bit on net to find it). It does build with VC ;)
Updated source (fixed it for passwords > 16 bytes)
@jfoug commented on GitHub (Aug 24, 2016):
60fc31b@jackpit110 please test. Also, if you can provide some hashes which have password (and user name if possible), that are not pure lower ascii characters. Things like
deberá etc which have non 0x7f ascii characters would be nice to get.
Note, this is VERY close to the oracle10 hash format. I assume under the hood, this is the same hash, BUT what we are seeing is 2 items sent to the client so the client can 'pre-validate' the password or something like that.
NOTE, there is no sniffed-oracle-2-john yet. Also, I took liberty in the format:
ora9iuserauth_sesskeyauth_passwordSince this is a 'new' format, we can easily change that if we need to.
@jfoug commented on GitHub (Aug 24, 2016):
NOTE, we also need some passwords entered that have upper case in them. I changed the format to be FMT_CASE, 'but' it may simply be that it is not case, but lowercases the password before encryption sent over the wire. Somewhat strange, since all the rest of oracle upcases (with proper utf16-be encoding).
But it is what it is. If this is how the actual server does things, we just need to mimic that behavior.
@magnumripper commented on GitHub (Aug 24, 2016):
We should add a PR to https://github.com/Ettercap/ettercap for a sniffer dissector.
@magnumripper commented on GitHub (Aug 24, 2016):
BTW we have oracle, oracle11, Oracle12C as normal (not sniffed) hash formats, and o5logon for the sniffed Oracle 10/11/12 stuff. Perhaps this should be called o3logon or whatever this protocol is called.
@jfoug commented on GitHub (Aug 24, 2016):
what do you think about the format (first) ?
ora9iusersesspass?
Note, should this be renamed oracle-sniffed, vs oracle9? I really do not think this is oracle 9i only, but think it is a quick-check value passed back to the client, prior to the client making the actual login request.
@jfoug commented on GitHub (Aug 24, 2016):
I actually think this is oracle 10 (and probably same in oracle 9) but is sniffed, vs grabbed from the DB.
The 'setup' looks damn near the same as oracle 10. We just have to decrypt the buffer in oracle's convoluted way, and then see that the password was in the encrypted data (i.e. there is no binary() data in our format).
BUT from the looks of things, it must be the same internal hash as we see in our oracle 10 (look at the DES, the key setup, IV's used, etc). Same stuff.
@jfoug commented on GitHub (Aug 24, 2016):
so possibly
oraclesniff??@jfoug commented on GitHub (Aug 24, 2016):
Where did the name '05login' come from? Would this not be 04login if 05 was 'correct' ? But yes, you are right, this probably is a better name if the 05login is also the 'sniffed' version.
@jfoug commented on GitHub (Aug 24, 2016):
Ok, hopefully this will pass tests:
70eb55a(it works fine on my clang, Sparc, linux-64, VC and cygwin).It is not that fast, nor is it written in stone that the format signature is what we want in the end. It is still missing OMP, and I need to see if it can also be optimized. I simply wanted 'something' that worked, and can be used as a test bed when the Ettercap or whatever *2john tool is built. I would like to get this into pass_gen.pl also (possibly), but it might be a bit more work than I want to invest for that tool however.
@magnumripper/@kholia I was not looking at doing a PR for Ettercap. I think you 2 are the main liaison between the projects, correct?
@jfoug commented on GitHub (Aug 24, 2016):
Good, the clang build/run got past this format with no core now. I am out for the evening, so hopefully whatever choices are made for the signature will be made for when the buzz wears off ;)
@magnumripper commented on GitHub (Aug 25, 2016):
It's not 05login, it's o5logon. The '5' is a version. IIRC I've seen o3logon mentioned but not o4logon so o4 may never have made it to the public (just like IPv5). Not sure at all.
@jfoug commented on GitHub (Aug 25, 2016):
How do we get the
o5logonhashes? Is that some builtin output from Ettercap ?I see no o5logon2john nor is it done in pcap2john.py.
@magnumripper commented on GitHub (Aug 25, 2016):
It's a dissector in ettercap. Just run a pcap through ettercap and it will output o5logon hashes in JtR format. I have an active PR submitted, enhancing it and adding Oracle 12 support.
@jfoug commented on GitHub (Aug 25, 2016):
Note, there is also a format we should make, that I 'think' is based on o5logon, but where the AUTH_VFR_DATA field contains no data, so the improvement we see where we only need to use the servers's session_key and the servers auth_vfr_data to see if the hash matches. BUT there is an algorithm that is almost like what I have done for this O3login hash, but it uses AES vs using DES (well there are other changes, BUT in the end it is very similar).
I just sniffed a login for my own account on our oracle server, and I can crack my password just fine. This deals with sniffing login sessions that are 'valid' (much like the 4-way WPAPSK sniffed sessions). I am pretty sure the O3logon is the same thing (sniffed valid login).
@jfoug commented on GitHub (Aug 25, 2016):
Here is the code for O5Logon without the AUTH_VFR_DATA security hole. This one uses a sniff of a valid login, needing to get both the client and server responses. This is very similar to the O3login format, but using aes and of course a little different logic. But still, we might want to investigate this as a format. I sniffed my corp network, while making an oracle connection with my desktop client, and from the wshark packets was able to get the 3 items needed (4 with my user id), and plugged into this code, and it cracked it just fine.
@jfoug commented on GitHub (Oct 7, 2016):
I am adding the above algorithm (there is no x2john at the moment). I am calling this o10glogon NOTE, 05logon is oracle 11g sniffed (with some security flaw). This is oracle 10g (sniffed) and there is no 'flaw' in the 10g AFAIK. I bet there is also 11g sniffed without the security flaw, not sure if we can find that or not.
What do ppl think of the name o10glogon ?? Could this be o4logon if there is such a beast ?
@jfoug commented on GitHub (Oct 7, 2016):
Not bad speed (but get an OMP helping hand, lol).
here is the code. I will wait to check in, to allow people to comment on the format_tag, format name, file name, etc. I am currently calling this o10glogon_fmt_plug.c with
$o10glogon$as the format tag.@magnumripper commented on GitHub (Oct 8, 2016):
AFAIK o3logon and o5logon are Oracle's names for protocols so we shouldn't invent our own that sounds like them. Either find out what they are calling this one, or use some generally descripting name.
@jfoug commented on GitHub (Oct 10, 2016):
that is what o10glogon was (my own generic name). It is the sniffed login data from oracle 10g client logon's. The problem is that 03logon is for oracle 8 (and 9?) and 05logon is for buggy 11g. (all sniffed). I bet there is also 11g 'generic' that is not the broken buggy o5logon that we support.
But this format is 100% 'there'. I have verified that it works, and all hashes were sniffed from a real oracle client/server connections. I just do not know what to name the damn thing. I am sort of leaning of leaving it alone, since it does list that this is a sniffed 10g protocol.
@magnumripper commented on GitHub (Oct 10, 2016):
Yeah o10glogon is fine until we know better. These are not exactly well documented protocols, I think most public info is reverse engineered.
@jfoug commented on GitHub (Oct 10, 2016):
I am pretty sure all of these are rev engineered (gotta love java where you ship source code, lol). And there are dozens of tweaks and mods to the oracle scheme.
I will check it in the way it is. NOTE, I have no intention of building a 10g2john ripper. Probably should be done in etercap in some manner (but I do not know that project at all).
9b18eef@jackpit110 commented on GitHub (Nov 19, 2016):
Sorry i wasn't around.
cap file from testing in oracle net manager in oracle 9:
oracle9ClientToOra11R2_Oracle9.zip
attached file is from oracle 9 to oracle 11 r2 .
oracle 9 session encryption is not same with oracle 10
user: scott
password: Oracle9
@jfoug
After running this query
-- USER SQL
ALTER USER "SCOTT" IDENTIFIED BY deberá
DEFAULT TABLESPACE "EXAMPLE"
TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK ;
I got
SQL Error: ORA-00911: invalid character
00911. 00000 - "invalid character"
*Cause: identifiers may not start with any ASCII character other than
letters and numbers. $#_ are also allowed after the first
character. Identifiers enclosed by doublequotes may contain
any character other than a doublequote. Alternative quotes
(q'#...#') cannot use spaces, tabs, or carriage returns as
delimiters. For all other contexts, consult the SQL Language
Reference Manual.
Comma, backslash, double quote and the DEFINE symbol are not allowed in passwords
cap file Oracle Enterprise Manager in Oracle 9:
oracle9toOracle11_Oracle9_oracleEnterpriseManager.zip
user: scott
password: Oracle9
it seems oracle 11 newer version have no problem with this password
user: scott
password: deberá
oracle9ClientToOra11R2_deberá.zip
@jackpit110 commented on GitHub (Nov 21, 2016):
I was not successful with cracking this cap file.
In this cap file i am connecting from sqlplus oracle 11 unpatched padding to oracle 12.
so it is downgrading to oracle 10(may be)
User: sys
password: hashcat
sqlplus11toOra12_hashcat.zip
$o10glogon$sys$9283C006D592527A298BCF1F7D6FCF358533793B32977A6839DE411482906C90$4529BF09FAC648A9250FB32FE44BAFAC8C4B97E17CC1D8914959E3CBD98F9E9D$32D21C6E5C3DCD93E55A29DCFE80BD1A644EEC5D62C36A0B3D0B0E9D460875BC