Open-AudIT

What's on your network?
It is currently Wed Jan 17, 2018 1:53 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
PostPosted: Sat Mar 01, 2008 4:32 am 
Offline
Newbie

Joined: Thu Feb 28, 2008 4:48 am
Posts: 16
I'm trying to detect the Acrobat 8 serial number, which is located in:

HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Adobe Acrobat\8.0\Registration

Under the value "SERIAL".

I added the following code to my audit_custom_software.inc file

But it doesn't seem to detect the key. I'm probably missing something simple.

I did manage to add a function to audit.vbs that works fine, however I don't want it there since it will be nuked when I check out the new version from svn.

Code:
''''''''''''''''''''''''''''''''
'   Adobe Acrobat 8 Key        '
''''''''''''''''''''''''''''''''
' Key for Acrobat 8 = HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Adobe Acrobat\8.0\Registration
' Variable is "SERIAL"
strKeyPath = "SOFTWARE\Adobe\Adobe Acrobat\8.0\Registration"
strValueName = "SERIAL"
display_name = "Adobe Acrobat 8"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,Adobe8_Key
form_input = "software^^^" & display_name       & "^^^" _
                  & Adobe8_Key       & "^^^" _
                  & ""                 & "^^^" _
                  & ""                 & "^^^" _
                  & OSInstall          & "^^^" _
                  & "Adobe^^^^^^^^^^^^^^^^^^" _
                  & ""                 & "^^^" _
                  & ""                 & "^^^" _
                  & "http://www.adobe.com"   & "^^^ "
entry form_input,comment,objTextFile,oAdd,oComment


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 01, 2008 9:48 am 
Offline
Newbie

Joined: Tue Dec 11, 2007 2:40 am
Posts: 24
Location: Pennsylvania
Just copy key one of the other key grabber snippets in Audit.vbs and change the unique values. This is how I do it except I don't use the custom software file I keep a log of my changes and add everything to audit.vbs...

Here is one for example

Code:
''''''''''''''''''''''''''''''''
'   Crystal Reports 9.0        '
''''''''''''''''''''''''''''''''
strKeyPath = "SOFTWARE\Crystal Decisions\9.0\Crystal Reports\Keycodes"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys

  name_xp = "Crystal Reports 9.0 " & subkey
  release_type = ""
  edition_type = subkey
  path = strKeyPath & "\" & subkey
  subKey = ""
  oReg.GetStringValue HKEY_LOCAL_MACHINE,Path,subKey,key
  if IsNull(key) then
  else
    strOffXPRUKey = GetCrystalKey(key)
    form_input = "ms_keys^^^" & name_xp       & "^^^" _
                              & strOffXPRUKey & "^^^" _
                              & release_type  & "^^^" _
                              & edition_type  & "^^^" _
                              & "crystal_reports_9" & "^^^"
    entry form_input,comment,objTextFile,oAdd,oComment
    strOffXPRUKey = ""
    release_type = ""
    edition_type = ""
    form_input = ""
  end if
Next


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 01, 2008 12:32 pm 
Offline
Newbie

Joined: Thu Feb 28, 2008 4:48 am
Posts: 16
Thanks, I have done that and made it work but as I said in my first post it doesn't make much sense to do it this way. Checking code out of the repository will clobber my changes so this is not a good way to go in terms of maintenance. I would like to get it working with the custom software file is possible. Any suggestions?


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 03, 2008 11:47 am 
Offline
Newbie

Joined: Tue Dec 11, 2007 2:40 am
Posts: 24
Location: Pennsylvania
Yeah. I feel your pain....believe me. I hesitate to make new changes because it takes a lot of work and time, which I don't mind but it's hard to get around to it. I think most of my time is spent troubleshooting. "Wy the hell is this not working...oh...because I screwed up my syntax or forgot to add a comma, semi-colon or space here." And with new SVN versions coming out so frequently, it makes it hard to keep track of all my custom audits and a pain to add them all back. It would be nice if we could create some sort of custom audit wizard that would allow you to create/edit and even import/export them. The create new audit feature could do everything for you, you would just have to supply all of the values. It could create the database, add the code to audit.vbs and update the appropriate php file. It could be something like this:

Audit:
Name: Adobe 8
Reg or WMI query (drop down): Reg
Reg Path: HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Adobe Acrobat\8.0\Registration
Reg Value Type: String
Reg Value Name: SERIAL

Database:
New or Existing (drop down): Existing
Database Name: ms_keys

Of course a flowchart of this would make much more sense as each answer could provide more or different options...but you get the idea.

This would be a cool way of sharing your audits with others too. They could almost be like plugins or packages. "Need to audit a particular piece of software? No problem...just download the plugin/package and import it or execute it and bam you're all set!" We could eventually build a nice repository of plugins that everyone could download. I'm sure it's possible but its beyond my reach. We woud cetainly need the experts to take on such a project. I think it woud be awesome.


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 04, 2008 4:16 pm 
If you can confirm the location of a software package's license key, and have the ability to extract it (the original key, i.e., one that can be used to reinstall the package), just post the code in the feature requests forum. It should be possible to add it in....


Top
  
Reply with quote  
PostPosted: Thu Mar 03, 2011 12:35 am 
Offline
Newbie

Joined: Fri Jan 21, 2011 9:51 pm
Posts: 4
Hi,

the key stored in registy is encrypted
I put together script, which will grab it & decrypt it:

Code:
''''''''''''''''''''''''''''''''
' Adobe Acrobat 8.0            '
''''''''''''''''''''''''''''''''
strKeyPath = strarrKeyPath & "Adobe\Adobe Acrobat\8.0\Registration"

name_xp = "Adobe Acrobat 8.0"
release_type = ""
edition_type = ""
path = strKeyPath
subKey = "SERIAL"
oReg.GetStringValue HKEY_LOCAL_MACHINE,Path,subKey,key

'This script decrypts any adobe serial stored in
'the windows registry into a key that can be used

Dim intVers, strValueName, strEncryptedKey
Dim strDecryptedKey, CipherIndex, i, strFormattedKey

' Adobe Substitution Cipher Key
Dim AdobeSubCipherKey(24)
AdobeSubCipherKey(0) = ""
AdobeSubCipherKey(1) = "0000000001"
AdobeSubCipherKey(2) = "5038647192"
AdobeSubCipherKey(3) = "1426053789"
AdobeSubCipherKey(4) = "2604371895"
AdobeSubCipherKey(5) = "4753896210"
AdobeSubCipherKey(6) = "8145962073"
AdobeSubCipherKey(7) = "0319728564"
AdobeSubCipherKey(8) = "7901235846"
AdobeSubCipherKey(9) = "7901235846"
AdobeSubCipherKey(10) = "0319728564"
AdobeSubCipherKey(11) = "8145962073"
AdobeSubCipherKey(12) = "4753896210"
AdobeSubCipherKey(13) = "2604371895"
AdobeSubCipherKey(14) = "1426053789"
AdobeSubCipherKey(15) = "5038647192"
AdobeSubCipherKey(16) = "3267408951"
AdobeSubCipherKey(17) = "5038647192"
AdobeSubCipherKey(18) = "2604371895"
AdobeSubCipherKey(19) = "8145962073"
AdobeSubCipherKey(20) = "7901235846"
AdobeSubCipherKey(21) = "3267408951"
AdobeSubCipherKey(22) = "1426053789"
AdobeSubCipherKey(23) = "4753896210"
AdobeSubCipherKey(24) = "0319728564"

intVers = "8.0"
strEncryptedKey = key

' We will build the decrypted key here
' Take the numeric value of char at index i of the encrypted
' key. That value provides an index within the string
' AdobeSubCipherKey(i). The char located at that index
' is the properly decrypted char.

For i = 1 To 24
CipherIndex = Cint(Mid(strEncryptedKey,i,1)) + 1
strDecryptedKey = strDecryptedKey & Mid(AdobeSubCipherKey(i),CipherIndex,1)
Next

'Include dashes for readability
strFormattedKey = Mid(strDecryptedKey,1,4) & "-" & Mid(strDecryptedKey,5,4) & "-" & Mid(strDecryptedKey,9,4) &_
            "-" & Mid(strDecryptedKey,13,4) & "-" & Mid(strDecryptedKey,17,4) & "-" & Mid(strDecryptedKey,21,4)
 
key = strFormattedKey
WScript.Echo "Adobe Acrobat 8.0 key: " & strEncryptedKey & " / " & key


if IsNull(key) then
else
strOffXPRUKey = key
    form_input = "ms_keys^^^" & name_xp       & "^^^" _
                              & strOffXPRUKey & "^^^" _
                              & release_type  & "^^^" _
                              & edition_type  & "^^^" _
                              & "adobe_acrobat_8" & "^^^"
    entry form_input,comment,objTextFile,oAdd,oComment
    strOffXPRUKey = ""
    release_type = ""
    edition_type = ""
    form_input = ""
end if


it should work for version 9.0 as well I think because decrypting function was written for ver 9.0

enjoy

DUGi


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group