Jump to content

SafeGuard Encryption Chalange Response API


tlman12
 Share

Recommended Posts

My company has recently purchased a product from Sophos called Safeguard Encryption. It’s a full disk encryption software with a vast amount of API interfaces, which is great for me because i love to simplify and make multiple screens into one or two. Anyways the first thing i decided to work on was the challenge response codes.

20-30 mins and i had a VBS working command driven file. But to simplify it further i needed to integrate with AD and i wanted to add a GUI as well. So i started work on it with autoit. I thought it would be easy to transfer to autoit because of how simple the VBS code was... but i was wrong.

Apparently it's not using an object like I’m used to like an Internet.application for example. I can create the original object but when i try to use the rest of the objects methods i get failures.

i don't know if anyone has ever used safeguard I’m hoping there’s someone here, and even if you haven't maybe you know something i may be missing?

Anyways here’s the vbs

dim Base, CRClass
dim result, out
dim key, user, computer, encuser, encpass, action, respType
If Wscript.Arguments.Count = 0 Then
wscript.echo "ERROR, COMMAND LINE REQUIRED"
Else
action = Wscript.Arguments(0)
user = Wscript.Arguments(1)
computer = Wscript.Arguments(2)
key = Wscript.Arguments(3)
encuser = Wscript.Arguments(4)
encpass = Wscript.Arguments(5)
respType = Wscript.Arguments(6)
' action = "doit"
' user = "CN=Travis,OU=IT,DC=TestDomain,DC=org"
' computer = "CN=Comp1,OU=Laptops,OU=Holding,DC=TestDomain,DC=org"
' key = "PK4J1V69USGYUWV5XK2ZJ6UXFSXJ64"
' encuser = "2892"
' encpass = ""
' respType = "2"

End If

set Base = Wscript.CreateObject("Utimaco.SafeGuard.AdministrationConsole.Scripting.Base")
set CRClass = Base.CreateCRClassInstance()
result = Base.Initialize()
result = Base.AuthenticateWHDOfficer(encuser & "@TestDomain",encpass)
result = CRClass.Initialize()
if action = "check" then
CRClass.CheckChallenge key,out
Wscript.StdOut.WriteLine out
end if
if action = "doit" then
CRClass.CheckChallenge key,out
if out = 0 then
CRClass.ComputeResponse user,computer,key,respType,out
Wscript.StdOut.WriteLine out
else
Wscript.StdOut.WriteLine "fail"
end if
end if

CRClass.FreeResources()
Base.FreeResources()

and heres the autoit i started.

Dim $Base,$CRClass

$user = "CN=Travis,OU=IT,DC=TestDomain,DC=org"
$computer = "CN=Comp1,OU=Laptops,OU=Holding,DC=TestDomain,DC=org"
$key = "PK4J1V69USGYUWV5XK2ZJ6UXFSXJ64"
$encuser = "Travis"
$encpass = ""
$respType = "2"
$Base = ObjCreate("Utimaco.SafeGuard.AdministrationConsole.Scripting.Base")
$CRClass = $Base.CreateCRClassInstance()
$result = $Base.Initialize()
$result = $Base.AuthenticateWHDOfficer($encuser & "@TestDomain",$encpass)
$result = $CRClass.Initialize()
$CRClass.CheckChallenge($key,$out)

I don't know if VB calls objects differently than AutoIt, maybe this is a simple fix?

****EDIT*****

i'm sure this would probably help.. this is a link to the API reference manual. http://tw.sophos.com/sophos/docs/eng/manuals/sgn_55_apmeng.pdf

Edited by tlman12
Link to comment
Share on other sites

I know that we are using SafeGuard Easy for disk encryption, but not in my department.

I can ask the guys what they are using to interact with the admin console.

What are you trying to do first using the API?

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

I'm just trying to make a more user friendly streamlined user interface using the challenge response API. Right mow I'm using auto it to call a command driven vbscript but it causes unneeded lag because it has to create the object and destroy object up to 4 times in the process of checking and submitting.

Link to comment
Share on other sites

Okay, I have no good news. In our company there are only ~ 1700 people. So, there is no need for an automation of the challenge response stuff.

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Okay, I have no good news. In our company there are only ~ 1700 people. So, there is no need for an automation of the challenge response stuff.

it's not really automation it just saves extra clicks and uneccesarry screens, especially when using the WebHelpDesk. plus it's intigrated into one of my main help desk apps.

like i said though, this would only make the process more effeciant i already have a working procedure using a combo of Autoit and VBS.

post-28348-0-45524400-1322498696_thumb.p

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...