Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 49 guests online
 
Advertisement

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Network Pen Testingarrow Decrypt info in referenced file in web.config
EH-Net
May 24, 2013, 08:12:31 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Decrypt info in referenced file in web.config  (Read 4133 times)
0 Members and 1 Guest are viewing this topic.
rick.m
Newbie
*
Offline Offline

Posts: 1


View Profile
« on: May 28, 2010, 09:13:15 AM »

Hello

I'm doing a test and I obtained a copy of the web.config file, the
interesting is that there is a line like that "<add key="PasswordFile"
value="C:\Inetpub\site\Users.acl" />"  this called my attention to be
on the inetpub folder and I was able to download it.

It's with base64, when decoding it is messed up, so I believe it's encrypted.

I found something on the web.config that is related with encryption
and hashing, but I'm unsure if it's used to encrypt this file.

<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate"
validation="SHA1" />
<add key="CryptoEngine" value="False" />
<add key="CryptoHashKey" value="SpartanLosHeros" />

SHA1 is a hash function, and based on the name of the file I believe
the contents contain usernames, so I don't believe they are using a
hash function.

The CryptoHashKey may be the key used to encrypt. But this
CryptoEngine configured to false sounds strange.

I find no reference to crypt algorithms on this file. Based on your
experience do you believe this CryptoHashKey is the key used to
encrypt this file? What algorithm? There is a default one used by
.NET?

I have no experience with .NET, someone with experience can point me
what it can be, or where discover the key and algorithm used?

Maybe a application that I enter the supposed key and the encrypted
data and it show me all the possibilities available with .NET?

Thank you
Logged
yatz
Full Member
***
Offline Offline

Posts: 222


View Profile WWW
« Reply #1 on: May 28, 2010, 09:19:05 AM »

If I'm not mistaken, the only way to get a password out of a hash is by using something like rainbow tables since hashes use destructive algorithms that cannot be reversed.

Logged

"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
yatz
Full Member
***
Offline Offline

Posts: 222


View Profile WWW
« Reply #2 on: May 28, 2010, 09:24:35 AM »

On second thought, I do remember working on a .NET app that had symmetric decryption functions in it.  One was called "Rijndael" which I was able to successfully decrypt

(*smack* read entire post before replying... *smack*)
Logged

"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
zeroflaw
Full Member
***
Offline Offline

Posts: 208



View Profile
« Reply #3 on: May 28, 2010, 12:45:03 PM »

CryptoHashKey could contain the key or some salt value. But you can't see where and how it is used in the actual web application unless you download the source files.

I haven't done much ASP.NET development so I'm not really sure what to tell you. But the System.Security.Cryptography namespace has many classes for cryptography, so it might be difficult to figure out which algorithm was used.

Logged

ZF
mambru
Jr. Member
**
Offline Offline

Posts: 98


View Profile
« Reply #4 on: May 28, 2010, 04:59:58 PM »

Quote
If I'm not mistaken, the only way to get a password out of a hash is by using something like rainbow tables since hashes use destructive algorithms that cannot be reversed.

Hash algorithms are not used to cipher, they don't use "destructive algorithms", they're called one-way functions.

Quote
On second thought, I do remember working on a .NET app that had symmetric decryption functions in it.  One was called "Rijndael" which I was able to successfully decrypt


Rijndael (which is popularly known as AES) is indeed a encryption algorithm, symmetric as you say, that's why it's possible to decrypt a message encrypted with it.

As zeroflaw said, .NET supports different encryption algorithms, and there's none used by default.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.066 seconds with 23 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
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:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Advertisement

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.