Home
Calendar
Certifications
Columns
Features
Forum
Resources
Vitals
Latest Additions
April 2013 Free Giveaway Sponsor - eLearnSecurity
Human Intelligence to Navigate the Security Data Deluge
February 2013 Free Giveaway Winner of SANS CyberCon Training
Interview: Bugcrowd Founders on Herding Ninjas for Crowdsourced Bug Bounties
Network Forensics: The Tree in the Forest
March 2013 Free Giveaway Sponsor - Mile2
Book Review: Violent Python
February 2013 Free Giveaway Sponsor - SANS
Holiday 2012 Free Giveaway Winner of Metasploit Pro by Rapid7
Course Review: SANS FOR408 Computer Forensic Investigations – Windows In-Depth
The Security Consulting Sugar High
Tutorial: Fun with SMB on the Command Line
Interview: Ilia Kolochenko, CEO of High-Tech Bridge
October 2012 Free Giveaway Winner of LearningGate Training
The Broken: Assessing Corporate Security in 2012 to Make a Better 2013
EH-Net Login
Welcome Guest.
Username:
Password:
Remember me
Lost Password?
No account yet?
Register
Who's Online
We have 54 guests and 1 member online
You are here:
Home
Ethical Hacking Discussions and Related Certifications
Web Applications
Password Encoding in Database
EH-Net
May 18, 2013, 11:46:45 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Go back to The Ethical Hacker Network Online Magazine
Home Page
Home
Help
Calendar
Login
Register
EH-Net
>
Ethical Hacking Discussions and Related Certifications
>
Web Applications
(Moderator:
don
) >
Password Encoding in Database
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Password Encoding in Database (Read 4858 times)
0 Members and 1 Guest are viewing this topic.
SynJunkie
Jr. Member
Offline
Posts: 71
Password Encoding in Database
«
on:
June 10, 2009, 04:02:02 AM »
Hi
I’m currently learning abut SQL Injection and as luck happens I was asked to have a poke around at an internal web application that we have to see if it has any problems. I’m by no means a pen tester just someone who likes to poke around at stuff.
I was quickly able to find a way to return logon names and passwords from the SQL database using SQL injection but password seem to be encoded/encrypted.
Is there a way to tell what encoding/encryption is used?
What I could see was that many accounts have the same stored password (12 characters and always starting with a = symbol) which I guessed correctly is “password”. However, my stored password (which isn’t “password”) is 16 characters and also starting with a = symbol. Other accounts that I now are not “password” are also 16 characters.
I have verified my findings with the backend database but I would like to demonstrate that although I can retrieve information on all the accounts I can then use the credentials to log in.
I have run the stored passwords through encoders on clez.net but it doesn’t decode my password to what I know it should be.
Thanks in advance for any help.
Regards
Syn
PS. I have permission to do this testing.
Logged
----------------------------------
http://synjunkie.blogspot.com
SynJunkie
Jr. Member
Offline
Posts: 71
Re: Password Encoding in Database
«
Reply #1 on:
June 10, 2009, 04:36:23 AM »
Just a followup on this.
I tried encoding my known password (using the encoding page on clez.net) and after comparing it to the stored password and found it to be base64 but reversed. So i tested this on a password which I didn't know and bingo!
Maybe this might help someone else out there.
One other question to anyone who may be experienced in this, is this a common method of storing passwords? Are there any other common ways of storing passwords?
Cheers
Syn
Logged
----------------------------------
http://synjunkie.blogspot.com
ethicalhack3r
Full Member
Offline
Posts: 139
Re: Password Encoding in Database
«
Reply #2 on:
June 10, 2009, 06:51:53 AM »
Here is a list of MySQL's encryption and compression functions:
http://dev.mysql.com/doc/refman/5.1/en/encryption-functions.html
Id say most of them in the link are pretty common.
Heres a good tut on PHP encryption and salts:
http://www.onlamp.com/pub/a/php/2001/07/26/encrypt.html
«
Last Edit: June 10, 2009, 06:54:00 AM by ethicalhack3r
»
Logged
SynJunkie
Jr. Member
Offline
Posts: 71
Re: Password Encoding in Database
«
Reply #3 on:
June 10, 2009, 10:49:38 AM »
Thanks for the links. They look pretty interesting although a bit over my head at the moment. Maybe it will all make sense one day :-)
Cheers
Syn
Logged
----------------------------------
http://synjunkie.blogspot.com
mambru
Jr. Member
Offline
Posts: 98
Re: Password Encoding in Database
«
Reply #4 on:
June 10, 2009, 11:00:04 AM »
Quote from: SynJunkie on June 10, 2009, 04:36:23 AM
One other question to anyone who may be experienced in this, is this a common method of storing passwords? Are there any other common ways of storing passwords?
I'd say that the fact of storing passwords is a bad practice, what you'd like to store are hashes of them
Logged
SynJunkie
Jr. Member
Offline
Posts: 71
Re: Password Encoding in Database
«
Reply #5 on:
June 10, 2009, 11:14:56 AM »
Agreed.
The question was really not "what should we do" but more "what are people doing in webapps". This is the first live web app I have looked at and I was curious if this was type of encoding was common.
Logged
----------------------------------
http://synjunkie.blogspot.com
former33t
Full Member
Offline
Posts: 226
Re: Password Encoding in Database
«
Reply #6 on:
June 10, 2009, 12:02:40 PM »
I'll caveat this by saying that the only web applications I've done any pentesting on were government and on "secure" networks.
I see one of three things done with web application authentication. The first is PKI, which is becoming more and more common. The second is storing the password hashes (I most often see SHA1 being used when used with MySQL). Storing the hashes helps some, but they can be cracked offline with a dictionary attack if you can get them dumped via SQL injection. These two are the methods I see when a "professional" has developed the web application.
When someone has read the PHP/mysql programming for dummies book and sets out to leave their mark on the organization, I see LOTS of SQL injection errors and plain text passwords stored in the database (or worse in a text file in the application directory). One of the first things I do with these web applications is to try to get a directory listing of the location of the web app. The second thing is that if they are using poorly designed classes that don't have an extension the server recognizes, I try to download those directly. They often contain the database passwords (which often makes user passwords unnecessary). The final thing I do before even trying SQL injection is to try to induce an error in the application with URL hacking to get it do display some of the logic (if error reporting isn't turned off).
At any rate, passwords in the clear and SQL injection are way to common. They are becoming even more common (in my experience) with the multitudes of inexperienced web "programmers" out there. My only consolation is that these systems don't touch the Internet so they are only vulnerable to insider attacks.
Logged
Certifications: CREA, MCSE: Security, CCNA, Security+, other junk
SynJunkie
Jr. Member
Offline
Posts: 71
Re: Password Encoding in Database
«
Reply #7 on:
June 10, 2009, 03:04:37 PM »
Useful to know. Thanks. lovin this SQL Injection stuff though. As soon as I figured out how to read the errors and tune my injection against the right columns to get the usernames and passwords out I was totally diggin it.
Cheers
Syn
Logged
----------------------------------
http://synjunkie.blogspot.com
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
EH-Net
-----------------------------
=> Calendar Of Events
===> ChicagoCon 2007
===> ChicagoCon 2008s
===> ChicagoCon 2008f
===> ChicagoCon 2009s
=> Ethical Hacktivism
=> News Items and General Discussion About EH-Net
===> Greetings
=> Special Events
-----------------------------
Ethical Hacking Discussions and Related Certifications
-----------------------------
=> General Certification
===> Networking
===> OS
===> Security
=> Compliance, Regulations & Standards
=> Control Systems
=> Cyber Warfare
=> Forensics
===> CCE / MCCE - (Master) Certified Computer Examiner
===> CHFI - Computer Hacking Forensic Investigator
===> EnCE - EnCase® Certified Examiner
===> GCFA - GIAC Certified Forensics Analyst
=> Hardware
=> Incident Response
===> CSIH - Computer Security Incident Handler
===> GCIH - GIAC Certified Incident Handler
=> Malware
===> Advisories
=> Mobile
=> Network Pen Testing
===> CEH - Certified Ethical Hacker
===> CPTC - Certified Penetration Testing Consultant
===> CPTE - Certified Penetration Testing Engineer
===> CSTA - Certified Security Testing Associate
===> eCPPT - eLearnSecurity Certified Professional Penetration Tester
===> ECSA - EC-Council Certified Security Analyst
===> GPEN - GIAC Certified Penetration Tester
===> OSCP - Offensive Security Certified Professional
=> Physical Security
=> Programming
=> Social Engineering
=> Web Applications
=> Wireless
===> CWNP Certs
===> GAWN - GIAC Assessing Wireless Networks
===> OSWP - Offensive Security Wireless Professional
=> Other
-----------------------------
Columns
-----------------------------
=> Editor-In-Chief
=> Andress
=> Gates
=> Haddix
=> Hadnagy
=> Heffner
=> Hoffman
=> Linn
=> RichM
=> Murray
=> J. Peltier
=> Weidman
=> Wilson
-----------------------------
Features
-----------------------------
=> /root
=> Book Reviews
=> Opinions
=> Skillz
===> Examples
===> May 06 - Star Hacks, Episode V: The Empire Hacks Back
===> July 06 - Hack Bill!
===> Sept 06 - Netcat in the Hat
===> Nov 06 - Hitch-Hackers Guide to the Galaxy
===> Dec 06 - A Christmas (Hacking) Story
===> Feb 07 - Charlottes Web Site
===> April 07 - Microsoft Office Space
===> June 07 - Serenity Hack
===> Oct 07 - Worst. Ethical. Hacker. Challenge. Ever.
===> Dec 07 - Frosty the Snow Crash
===> March 2008 - It Happened One Friday
===> Oct 2008 - Scooby Doo and the Crypto Caper
===> Dec 08 - Santa Claus Is Hacking to Town
===> Feb 2009 - Brady Bunch Boondoggle
===> July 2009 - Prison Break
===> October 2009 - SSHliders
===> December 2009 - Miracle on Thirty-Hack Street
===> December 2010 - The Nightmare Before Charlie Browns Christmas
-----------------------------
Resources
-----------------------------
=> Career Central
===> Looking For Work
===> Looking To Hire
=> Links to cool sites.
=> Mass Media
=> News from the Outside World
=> Tools
=> Tutorials
===> Tutorial Requests
Loading...
Exclusive Deal
SANSFIRE 2013
June 15 - 22
5% Off
w/ Code
:
EHN_5
SANS Deals 4 EH-Netters
5% OFF
Any
SANS Course
in Any Format!
Coupon Code:
EHN_5
Including
SANS Rocky Mountain 2013
&
SANS Boston 2013
Polls
Compared to this year, 2013 will be:
Great!
Better.
About the same.
Little worse.
FUBAR!
Recent Forum Topics
General Certification
: CPT Practical Submission
(0) by
z28power4u
OSCP - Offensive Security Certified Professional
: Class Scheduled 6/8 - Linux n00b
(5) by
MrTuxracer
Career Central
: Starter cert?
(0) by
Alert
Web Applications
: Nessus and Nikto
(4) by
Seen
Tutorials
: Need guidance
(7) by
impelse
Malware
: EICAR?
(2) by
SephStorm
Network Pen Testing
: Cracking salted MD5 hash
(4) by
n37sh@rk
CEH - Certified Ethical Hacker
: Passed my C|EH
(3) by
n37sh@rk
Mass Media
: EC-council hacked, irony at his best?
(0) by
j0rDy
Web Applications
: SQL Injection into an INSERT statement.
(6) by
eyenit0
Network Pen Testing
: Solution for sipXtapi INVITE Message CSeq Field Header Remote Overflow
(1) by
m0wgli
Web Applications
: dns
(2) by
H1t M0nk3y
Other
: BSides Boston
(0) by
3xban
Career Central
: InfoSec in Central, FL
(2) by
tturner
Web Applications
: Web vulnerability scanner
(4) by
H1t M0nk3y
EH-Net News Feeds
Latest Additions
Privacy Notice
for TDCC & All Properties
© 2013 The Ethical Hacker Network
Joomla!
is Free Software released under the GNU/GPL License.