# HG changeset patch # User mb # Date 1386090286 -3600 # Node ID 903480cebdfbc858571c25a7334846c4973c45f1 # Parent 088f4b20dbbc4819541a843921982f9b63f5a598 added vmmanager and USBEventSvc diff -r 088f4b20dbbc -r 903480cebdfb server/opensecurityd.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/opensecurityd.py Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,190 @@ +#!/bin/env python +# -*- coding: utf-8 -*- + +# ------------------------------------------------------------ +# opensecurityd +# +# the opensecurityd as RESTful server +# +# Autor: Oliver Maurhart, +# +# Copyright (C) 2013 AIT Austrian Institute of Technology +# AIT Austrian Institute of Technology GmbH +# Donau-City-Strasse 1 | 1220 Vienna | Austria +# http://www.ait.ac.at +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation version 2. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# ------------------------------------------------------------ + + +# ------------------------------------------------------------ +# imports + +import os +import os.path +import subprocess +import sys +import web +from vmmanager.vmmanager import VMManager + +# local +from environment import Environment + + +# ------------------------------------------------------------ +# const + +__version__ = "0.1" + + +"""All the URLs we know mapping to class handler""" +opensecurity_urls = ( + '/device_change', 'os_device_change', + '/application', 'os_application', + '/device', 'os_device', + '/device/credentials', 'os_device_credentials', + '/device/password', 'os_device_password', + '/', 'os_root' +) + + +# ------------------------------------------------------------ +# code + +gvm_mgr = VMManager() + + +class os_application: + + """OpenSecurity '/application' handler. + + This is called on GET /application?vm=VM-ID&app=APP-ID + This tries to access the vm identified with the label VM-ID + and launched the application identified APP-ID + """ + + def GET(self): + + # pick the arguments + args = web.input() + + # we _need_ a vm + if not "vm" in args: + raise web.badrequest() + + # we _need_ a app + if not "app" in args: + raise web.badrequest() + + ## TODO: HARD CODED STUFF HERE! THIS SHOULD BE FLEXIBLE! + ssh_private_key = os.path.join(Environment("opensecurity").data_path, 'share', '192.168.56.15.ppk') + putty_session = '192.168.56.15' + process_command = ['plink.exe', '-i', ssh_private_key, putty_session, args.app] + si = subprocess.STARTUPINFO() + si.dwFlags = subprocess.STARTF_USESHOWWINDOW + si.wShowWindow = subprocess.SW_HIDE + print('tyring to launch: ' + ' '.join(process_command)) + process = subprocess.Popen(process_command, shell = True) + return 'launched: ' + ' '.join(process_command) + +class os_device: + + """OpenSecurity '/device' handler""" + + def GET(self): + return "os_device" + +class os_device_change: + + """OpenSecurity '/device_change' handler""" + + def GET(self): + gvm_mgr.cygwin_path = 'c:\\cygwin64\\bin\\' + #gvm_mgr.configureHostNetworking() + print 'received device_change' + return "os_device_change" + + +class os_device_credentials: + + """OpenSecurity '/device/credentials' handler. + + This is called on GET /device/credentials?id=DEVICE-ID. + Ideally this should pop up a user dialog to insert his + credentials based the DEVICE-ID + """ + + def GET(self): + + # pick the arguments + args = web.input() + + # we _need_ a device id + if not "id" in args: + raise web.badrequest() + + # invoke the user dialog as a subprocess + dlg_credentials_image = os.path.join(sys.path[0], 'opensecurity-dialog.py') + process_command = [sys.executable, dlg_credentials_image, 'credentials', 'Please provide credentials for accessing \ndevice: "{0}".'.format(args.id)] + process = subprocess.Popen(process_command, shell = False, stdout = subprocess.PIPE) + result = process.communicate()[0] + if process.returncode != 0: + return 'Credentials request has been aborted.' + + return result + + +class os_device_password: + + """OpenSecurity '/device/password' handler. + + This is called on GET /device/password?id=DEVICE-ID. + Ideally this should pop up a user dialog to insert his + password based the DEVICE-ID + """ + + def GET(self): + + # pick the arguments + args = web.input() + + # we _need_ a device id + if not "id" in args: + raise web.badrequest() + + # invoke the user dialog as a subprocess + dlg_credentials_image = os.path.join(sys.path[0], 'opensecurity-dialog.py') + process_command = [sys.executable, dlg_credentials_image, 'password', 'Please provide a password for accessing \ndevice: "{0}".'.format(args.id)] + process = subprocess.Popen(process_command, shell = False, stdout = subprocess.PIPE) + result = process.communicate()[0] + if process.returncode != 0: + return 'Credentials request has been aborted.' + + return result + + +class os_root: + + """OpenSecurity '/' handler""" + + def GET(self): + return "OpenSecurity-Server { \"version\": \"%s\" }" % __version__ + + +# start +if __name__ == "__main__": + server = web.application(opensecurity_urls, globals()) + server.run() + diff -r 088f4b20dbbc -r 903480cebdfb server/opensecurityd.pyc Binary file server/opensecurityd.pyc has changed diff -r 088f4b20dbbc -r 903480cebdfb server/vmmanager/PKG-INFO --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/vmmanager/PKG-INFO Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,10 @@ +Metadata-Version: 1.0 +Name: vmmanager.py +Version: 0.1 +Summary: vmmanager.py: manages GustVM's +Home-page: http://webpy.org/ +Author: Mihai Bartha +Author-email: mihai.bartha@ait.ac.at +License: Public domain +Description: Module to manage virtualbox guests and host +Platform: any diff -r 088f4b20dbbc -r 903480cebdfb server/vmmanager/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/vmmanager/__init__.py Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,6 @@ +__version__ = "0.1" +__author__ = [ + "Mihai Bartha " +] +__license__ = "public domain" +__contributors__ = "OpenSecurity Consortium" \ No newline at end of file diff -r 088f4b20dbbc -r 903480cebdfb server/vmmanager/__init__.pyc Binary file server/vmmanager/__init__.pyc has changed diff -r 088f4b20dbbc -r 903480cebdfb server/vmmanager/vmmanager.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/vmmanager/vmmanager.py Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,299 @@ +''' +Created on Nov 19, 2013 + +@author: BarthaM +''' +import os +import os.path +from subprocess import Popen, PIPE, call +import subprocess +import sys +import re + +DEBUG = True + +class USBFilter: + vendorid = "" + productid = "" + revision = "" + + def __init__(self, vendorid, productid, revision): + self.vendorid = vendorid.lower() + self.productid = productid.lower() + self.revision = revision.lower() + return + + def __eq__(self, other): + return self.vendorid == other.vendorid and self.productid == other.productid and self.revision == other.revision + + def __hash__(self): + return hash(self.vendorid) ^ hash(self.productid) ^ hash(self.revision) + + def __repr__(self): + return "VendorId = \'" + str(self.vendorid) + "\' ProductId = \'" + str(self.productid) + "\' Revision = \'" + str(self.revision) + "\'" + + +class VMManager(object): + vmRootName = "SecurityDVM" + systemProperties = None + cygwin_path = 'c:\\cygwin64\\bin\\' + + def __init__(self): + self.systemProperties = self.getSystemProperties() + #TODO: get cygwin path externally + return + + def execute(self, cmd): + if DEBUG: + print('trying to launch: ' + cmd) + process = Popen(cmd, stdout=PIPE, stderr=PIPE) + if DEBUG: + print('launched: ' + cmd) + result = process.wait() + res_stdout = process.stdout.read(); + res_stderr = process.stderr.read(); + if DEBUG: + if res_stdout != "": + print res_stdout + if res_stderr != "": + print res_stderr + return result, res_stdout, res_stderr + + def getSystemProperties(self): + cmd = 'VBoxManage list systemproperties' + result = self.execute(cmd) + if result[1]=='': + return None + props = dict((k.strip(),v.strip().strip('"')) for k,v in (line.split(':', 1) for line in result[1].strip().splitlines())) + return props + + def getDefaultMachineFolder(self): + return self.systemProperties["Default machine folder"] + + def createVM(self, vm_name): + hostonly_if = self.getHostOnlyIFs() + cmd = 'VBoxManage createvm --name ' + vm_name, ' --ostype Debian --register' + self.execute(cmd) + cmd = 'VBoxManage modifyvm ' + vm_name + ' --memory 512 --vram 10 --cpus 1 --usb on --usbehci on --nic1 hostonly --hostonlyadapter1 ' + hostonly_if['Name'] + ' --nic2 nat' + self.execute(cmd) + cmd = 'VBoxManage storagectl ' + vm_name + ' --name contr1 --add sata --sataportcount 2' + self.execute(cmd) + cmd = 'VBoxManage storageattach ' + vm_name + ' --storagectl contr1 --port 0 --device 0 --type hdd --mtype normal --medium C:\Users\BarthaM\VirtualBox VMs\SecurityVM\SecurityVM.vdi' + self.execute(cmd) + return + + def attachRSD(self, vm_name, filter): + cmd = 'VBoxManage usbfilter add 0 --target ' + vm_name + ' --name OpenSecurityRSD --vendorid ' + filter.vendorid + ' --productid ' + filter.productid + ' --revision ' + filter.revision + print self.execute(cmd) + + def removeVM(self, vm_name): + print('removing ' + vm_name) + cmd = 'VBoxManage unregistervm', vm_name, '--delete' + print self.execute(cmd) + machineFolder = self.getDefaultMachineFolder() + cmd = self.cygwin_path+'bash.exe --login -c \"rm -rf ' + machineFolder + '\\' + vm_name + '*\"' + print self.execute(cmd) + + def startVM(self, vm_name): + print('starting ' + vm_name) + cmd = 'VBoxManage startvm ' + vm_name + ' --type headless' + print self.execute(cmd) + + def stopVM(self, vm_name): + print('stopping ' + vm_name) + cmd = 'VBoxManage controlvm ' + vm_name + ' poweroff' + print self.execute(cmd) + + def getHostOnlyIFs(self): + cmd = ['VBoxManage list hostonlyifs'] + result = self.execute(cmd) + if result=='': + return None + props = dict((k.strip(),v.strip().strip('"')) for k,v in (line.split(':', 1) for line in result.strip().splitlines())) + return props + + def getHostOnlyIP(self, vm_name): + print('gettting hostOnly IP address ' + vm_name) + cmd = 'VBoxManage guestproperty get ' + vm_name + ' /VirtualBox/GuestInfo/Net/0/V4/IP' + result = self.execute(cmd) + if result=='': + return None + result = result[1] + return result[result.index(':')+1:].strip() + + def listRSDS(self): + cmd = 'VBoxManage list usbhost' + results = self.execute(cmd) + results = results.split('Host USB Devices:')[1].strip() + + items = list( "UUID:"+result for result in results.split('UUID:') if result != '') + rsds = dict() + for item in items: + props = dict() + for line in item.splitlines(): + if line != "": + k,v = line[:line.index(':')].strip(), line[line.index(':')+1:].strip() + props[k] = v; + + if 'Product' in props.keys() and props['Product'] == 'Mass Storage': + usb_filter = USBFilter( re.search(r"\((?P[0-9A-Fa-f]+)\)", props['VendorId']).groupdict()['vid'], + re.search(r"\((?P[0-9A-Fa-f]+)\)", props['ProductId']).groupdict()['pid'], + re.search(r"\((?P[0-9A-Fa-f]+)\)", props['Revision']).groupdict()['rev'] ) + rsds[props['UUID']] = usb_filter; + if DEBUG: + print filter + return rsds + + def listVM(self): + cmd = 'VBoxManage list vms' + result = self.execute(cmd) + vms = list(k.strip().strip('"') for k,_ in (line.split(' ') for line in result.splitlines())) + return vms + + def listSDVM(self): + vms = self.listVM() + svdms = [] + for vm in vms: + if vm.startswith(self.vmRootName) and vm != self.vmRootName: + svdms.append(vm) + return svdms + + def generateSDVMName(self): + vms = self.listVM() + for i in range(0,999): + if(not self.vmRootName+str(i) in vms): + return self.vmRootName+str(i) + return '' + + def getVMInfo(self, vm_name): + cmd = 'VBoxManage showvminfo ' + vm_name + ' --machinereadable' + results = self.execute(cmd) + props = dict((k.strip(),v.strip().strip('"')) for k,v in (line.split('=', 1) for line in results.splitlines())) + return props + + def getUSBFilter(self, vm_name): + props = self.getVMInfo(vm_name) + keys = set(['USBFilterVendorId1', 'USBFilterProductId1', 'USBFilterRevision1']) + keyset = set(props.keys()) + usb_filter = None + if keyset.issuperset(keys): + usb_filter = USBFilter(props['USBFilterVendorId1'], props['USBFilterProductId1'], props['USBFilterRevision1']) + return usb_filter + + def getAttachedRSDs(self): + vms = self.listSDVM() + attached_devices = dict() + for vm in vms: + filter = self.getUSBFilter(vm) + if filter != None: + attached_devices[vm] = filter + return attached_devices + + #generates ISO containing authorized_keys for use with guest VM + def genCertificateISO(self, vm_name): + machineFolder = self.getDefaultMachineFolder() + # create .ssh folder in vm_name + cmd = self.cygwin_path+'bash.exe --login -c \"mkdir -p \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\\"\"' + result = self.execute(cmd) + # generate dvm_key pair in vm_name / .ssh + cmd = self.cygwin_path+'bash.exe --login -c \"ssh-keygen -q -t rsa -N \\"\\" -C \\\"' + vm_name + '\\\" -f \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\dvm_key\\\"\"' #'echo -e "y\\n" |', + result = self.execute(cmd) + # set permissions for keys + #TODO: test without chmod + cmd = self.cygwin_path+'bash.exe --login -c \"chmod 500 \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\*\\\"\"' + result = self.execute(cmd) + # move out private key + cmd = self.cygwin_path+'bash.exe --login -c \"mv \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\dvm_key\\\" \\\"' + machineFolder + '\\' + vm_name + '\\\"' + result = self.execute(cmd) + # rename public key to authorized_keys + cmd = self.cygwin_path+'bash.exe --login -c \"mv \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\dvm_key.pub\\\" \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\authorized_keys\\\"' + result = self.execute(cmd) + # generate iso image with .ssh/authorized keys + cmd = self.cygwin_path+'bash.exe --login -c \"/usr/bin/genisoimage -J -R -o \\\"' + machineFolder + '\\' + vm_name + '\\'+ vm_name + '.iso\\\" \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\\"\"' + result = self.execute(cmd) + + # attaches generated ssh public cert to guest vm + def attachCertificateISO(self, vm_name): + machineFolder = self.getDefaultMachineFolder() + cmd = 'vboxmanage storageattach ' + vm_name + ' --storagectl contr1 --port 1 --device 0 --type dvddrive --mtype readonly --medium \"' + machineFolder + '\\' + vm_name + '\\'+ vm_name + '.iso\"' + result = self.execute(cmd) + return result + + # handles device change events + def handleDeviceChange(self): + attached_devices = self.getAttachedRSDs() + connected_devices = self.listRSDS() + for vm_name in attached_devices.keys(): + if attached_devices[vm_name] not in connected_devices.values(): + self.stopVM(vm_name) + self.removeVM(vm_name) + + attached_devices = self.getAttachedRSDs() + for connected_device in connected_devices.values(): + if connected_device not in attached_devices.values(): + new_sdvm = self.generateSDVMName() + self.createVM(new_sdvm) + self.genCertificateISO(new_sdvm) + self.attachCertificateISO(new_sdvm) + self.attachRSD(new_sdvm, connected_device) + self.startVM(new_sdvm) + + # executes command over ssh on guest vm + def sshGuestExecute(self, vm_name, prog): + # get vm ip + address = self.getHostOnlyIP(vm_name) + machineFolder = self.getDefaultMachineFolder() + # run command + cmd = self.cygwin_path+'bash.exe --login -c \"ssh -i \\\"' + machineFolder + '\\' + vm_name + '\\dvm_key\\\" bartham@' + address + ' ' + prog + '\"' + return self.execute(cmd) + + # executes command over ssh on guest vm with X forwarding + def sshGuestX11Execute(self, vm_name, prog): + #TODO: verify if X server is running on user account + #TODO: set DISPLAY accordingly + address = self.getHostOnlyIP(vm_name) + machineFolder = self.getDefaultMachineFolder() + # run command + cmd = self.cygwin_path+'bash.exe --login -c \"DISPLAY=:0 ssh -Y -i \\\"' + machineFolder + '\\' + vm_name + '\\dvm_key\\\" bartham@' + address + ' ' + prog + '\"' + return self.execute(cmd) + + # configures hostonly networking and DHCP server + # requires admin rights + def configureHostNetworking(self): + #cmd = 'vboxmanage list hostonlyifs' + #self.execute(cmd) + #cmd = 'vboxmanage hostonlyif remove \"VirtualBox Host-Only Ethernet Adapter\"' + #self.execute(cmd) + #cmd = 'vboxmanage hostonlyif create' + #self.execute(cmd) + cmd = 'vboxmanage hostonlyif ipconfig \"VirtualBox Host-Only Ethernet Adapter\" --ip 192.168.56.1 --netmask 255.255.255.0' + self.execute(cmd) + #cmd = 'vboxmanage dhcpserver add' + #self.execute(cmd) + cmd = 'vboxmanage dhcpserver modify --ifname \"VirtualBox Host-Only Ethernet Adapter\" --ip 192.168.56.1 --netmask 255.255.255.0 --lowerip 192.168.56.100 --upperip 192.168.56.255' + self.execute(cmd) + + # executes NET USE and connects to samba share on guestos + def netUse(self, vm_name): + ip = self.getHostOnlyIP(vm_name) + cmd = 'net use H: \\' + ip + '\RSD_Device' + return self.execute(cmd) + + +if __name__ == '__main__': + man = VMManager() + man.cygwin_path = 'c:\\cygwin64\\bin\\' + #man.handleDeviceChange() + #print man.listSDVM() + man.configureHostNetworking() + vm_name = "SecurityDVM0" + man.genCertificateISO(vm_name) + #man.attachCertificateISO(vm_name) + #man.sshGuestExecute(vm_name, "ls") + #man.sshGuestX11Execute(vm_name, "iceweasel") + #cmd = "c:\\cygwin64\\bin\\bash.exe --login -c \"/bin/ls\"" + #man.execute(cmd) + + + + diff -r 088f4b20dbbc -r 903480cebdfb server/vmmanager/vmmanager.pyc Binary file server/vmmanager/vmmanager.pyc has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/Debug/OpenSecUSBEventSvc.Build.CppClean.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/Debug/OpenSecUSBEventSvc.Build.CppClean.log Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,14 @@ +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecusbeventsvc.pch +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\vc120.pdb +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\vc120.idb +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\stdafx.obj +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecusbeventsvc.obj +c:\program files\opensecurity\server\windows\usbeventsvc\debug\opensecusbeventsvc.ilk +c:\program files\opensecurity\server\windows\usbeventsvc\debug\opensecusbeventsvc.exe +c:\program files\opensecurity\server\windows\usbeventsvc\debug\opensecusbeventsvc.pdb +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecu.b54f4a89.tlog\cl.command.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecu.b54f4a89.tlog\cl.read.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecu.b54f4a89.tlog\cl.write.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecu.b54f4a89.tlog\link.command.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecu.b54f4a89.tlog\link.read.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecu.b54f4a89.tlog\link.write.1.tlog diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/Debug/OpenSecUSBEventSvc.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/Debug/OpenSecUSBEventSvc.log Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,5 @@ +Build started 12/3/2013 6:03:54 PM. + +Build succeeded. + +Time Elapsed 00:00:00.03 diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.cpp Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,399 @@ +#include +#include +#include + +#include +#include +#include +#include +#include +#include "OpenSecUSBEventSvcLog.h" + +#pragma comment(lib, "advapi32.lib") + +#define SVCNAME TEXT("OpenSecUSBEventSvc") + +//sc create "USBEventSvc" binPath= "C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\USBEventSvc\Debug\USBEventSvc.exe" +//sc delete "USBEventSvc" + +// USB Raw Device Interface Class GUID +//{ 0xa5dcbf10, 0x6530, 0x11d2, { 0x90, 0x1f, 0x00, 0xc0, 0x4f, 0xb9, 0x51,0xed } } +// Disk Device Interface Class GUID +//{ 0x53f56307, 0xb6bf, 0x11d0, { 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b } } + +// This GUID is for all USB serial host PnP drivers +//GUID WceusbshGUID = { 0x25dbce51, 0x6c8f, 0x4a72, 0x8a, 0x6d, 0xb5, 0x4c, 0x2b, 0x4f, 0xc8, 0x35 }; + +GUID WceusbshGUID = { 0x88bae032, 0x5a81, 0x49f0, 0xbc, 0x3d, 0xa4, 0xff, 0x13, 0x82, 0x16, 0xd6 }; +//DEFINE_GUID(GUID_CLASS_STORAGE_VOLUME, 0x53F5630DL, 0xB6BF, 0x11D0, 0x94, 0xF2, 0x00, 0xA0, 0xC9, 0x1E, 0xFB, 0x8B); + + +SERVICE_STATUS gSvcStatus; +SERVICE_STATUS_HANDLE gSvcStatusHandle = NULL; +HANDLE ghSvcStopEvent = NULL; +HDEVNOTIFY ghDeviceNotify; + +DWORD WINAPI ServiceWorkerThread(LPVOID lpParam); + +VOID SvcInstall(void); +VOID WINAPI SvcCtrlHandler(DWORD); +VOID WINAPI SvcMain(DWORD, LPTSTR *); + +VOID ReportSvcStatus(DWORD, DWORD, DWORD); +VOID SvcInit(DWORD, LPTSTR *); +VOID SvcReportEvent(WORD, LPTSTR); + + +// DoRegisterDeviceInterfaceToHwnd +// Registers an HWND for notification of changes in the device interfaces +// for the specified interface class GUID. +// Parameters: +// InterfaceClassGuid - The interface class GUID for the device +// interfaces. +// hWnd - Window handle to receive notifications. +// hDeviceNotify - Receives the device notification handle. On failure, +// this value is NULL. +// Return Value: +// If the function succeeds, the return value is TRUE. +// If the function fails, the return value is FALSE. +// Note: +// RegisterDeviceNotification also allows a service handle be used, +// so a similar wrapper function to this one supporting that scenario +// could be made from this template. + +BOOL DoRegisterDeviceInterfaceToHwnd(void) { + DEV_BROADCAST_DEVICEINTERFACE NotificationFilter; + ZeroMemory(&NotificationFilter, sizeof (NotificationFilter)); + NotificationFilter.dbcc_size = sizeof (DEV_BROADCAST_DEVICEINTERFACE); + NotificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE; + NotificationFilter.dbcc_classguid = GUID_DEVINTERFACE_USB_DEVICE; + memcpy(&(NotificationFilter.dbcc_classguid), &(GUID_DEVINTERFACE_USB_DEVICE), sizeof(struct _GUID)); + + ghDeviceNotify = RegisterDeviceNotification(gSvcStatusHandle, + &NotificationFilter, + DEVICE_NOTIFY_SERVICE_HANDLE | DEVICE_NOTIFY_ALL_INTERFACE_CLASSES); + + if (NULL == ghDeviceNotify) { + SvcReportEvent(EVENTLOG_ERROR_TYPE, _T("RegisterDeviceNotification failed!")); + return FALSE; + } + return TRUE; +} + +// +// Purpose: +// Entry point for the process +// +// Parameters: +// None +// +// Return value: +// None +// +void __cdecl _tmain(int argc, TCHAR *argv[]) { + // If command-line parameter is "install", install the service. + // Otherwise, the service is probably being started by the SCM. + if (lstrcmpi(argv[1], TEXT("install")) == 0){ + SvcInstall(); + return; + } + + // TO_DO: Add any additional services for the process to this table. + SERVICE_TABLE_ENTRY DispatchTable[] = { + { SVCNAME, (LPSERVICE_MAIN_FUNCTION)SvcMain }, + { NULL, NULL } + }; + + // This call returns when the service has stopped. + // The process should simply terminate when the call returns. + if (!StartServiceCtrlDispatcher(DispatchTable)) { + SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("StartServiceCtrlDispatcher")); + } +} + +// Purpose: +// Installs a service in the SCM database +// +// Parameters: +// None +// +// Return value: +// None +// +VOID SvcInstall() { + SC_HANDLE schSCManager; + SC_HANDLE schService; + TCHAR szPath[MAX_PATH]; + + if (!GetModuleFileName(NULL, szPath, MAX_PATH)) { + printf("Cannot install service (%d)\n", GetLastError()); + return; + } + + // Get a handle to the SCM database. local computer, ServicesActive database, full access rights + schSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); + if (NULL == schSCManager) { + printf("Open SCManager failed (%d)\n", GetLastError()); + return; + } + + // Create the service + schService = CreateService( + schSCManager, // SCM database + SVCNAME, // name of service + SVCNAME, // service name to display + SERVICE_ALL_ACCESS, // desired access + SERVICE_WIN32_OWN_PROCESS, // service type + SERVICE_DEMAND_START, // start type + SERVICE_ERROR_NORMAL, // error control type + szPath, // path to service's binary + NULL, // no load ordering group + NULL, // no tag identifier + NULL, // no dependencies + NULL, // LocalSystem account + NULL); // no password + + if (schService == NULL) { + printf("CreateService failed (%d)\n", GetLastError()); + CloseServiceHandle(schSCManager); + return; + } + else printf("Service installed successfully\n"); + + CloseServiceHandle(schService); + CloseServiceHandle(schSCManager); +} + +// +// Purpose: +// Entry point for the service +// +// Parameters: +// dwArgc - Number of arguments in the lpszArgv array +// lpszArgv - Array of strings. The first string is the name of +// the service and subsequent strings are passed by the process +// that called the StartService function to start the service. +// +// Return value: +// None. +// +VOID WINAPI SvcMain(DWORD dwArgc, LPTSTR *lpszArgv) { + // Register the handler function for the service + gSvcStatusHandle = RegisterServiceCtrlHandlerEx(SVCNAME, (LPHANDLER_FUNCTION_EX)SvcCtrlHandler, 0); + if (!gSvcStatusHandle) { + SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("RegisterServiceCtrlHandler")); + return; + } + + // These SERVICE_STATUS members remain as set here + gSvcStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS; + gSvcStatus.dwServiceSpecificExitCode = 0; + + // Report initial status to the SCM + ReportSvcStatus(SERVICE_START_PENDING, NO_ERROR, 3000); + + if (!DoRegisterDeviceInterfaceToHwnd()) { + // Terminate on failure. + SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("DoRegisterDeviceInterfaceToHwnd")); + ExitProcess(1); + } + + // default security attributes, manual reset, not signaled, no name + ghSvcStopEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + if (ghSvcStopEvent == NULL) { + ReportSvcStatus(SERVICE_STOPPED, NO_ERROR, 0); + return; + } + + // Report running status when initialization is complete. + ReportSvcStatus(SERVICE_RUNNING, NO_ERROR, 0); + SvcReportEvent(EVENTLOG_INFORMATION_TYPE, TEXT("OpenSecUSBEventSvc is running")); + + // Wait until our worker thread exits signaling that the service needs to stop + WaitForSingleObject(ghSvcStopEvent, INFINITE); + + SvcReportEvent(EVENTLOG_INFORMATION_TYPE, TEXT("OpenSecUSBEventSvc is exiting")); + // Perform any cleanup tasks + CloseHandle(ghSvcStopEvent); + + // Report running status when initialization is complete. + ReportSvcStatus(SERVICE_STOPPED, NO_ERROR, 0); +} + +void NotifyOpenSecManager (void) { + HINTERNET hSession = NULL, + hConnect = NULL, + hRequest = NULL; + BOOL bResults = FALSE; + + //devices_json = url_encode(devices_json); + // Use WinHttpOpen to obtain a session handle. + hSession = WinHttpOpen(L"OpenSecUSBEventSvc", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); + if (!hSession) { + SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("Error notifying the OpenSec manager. WinHttpOpen failed! ")); + return; + } + // Specify an HTTP server. + hConnect = WinHttpConnect(hSession, L"localhost", 8080, 0); + if (!hConnect) { + SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("Error notifying the OpenSec manager. WinHttpConnect failed! ")); + return; + } + + // Create an HTTP request handle. + hRequest = WinHttpOpenRequest(hConnect, L"GET", L"/device_change", NULL, WINHTTP_NO_REFERER, NULL, NULL); + if(!hRequest) { + SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("Error notifying the OpenSec manager. WinHttpOpenRequest failed! ")); + return; + } + + // Send a request. + bResults = WinHttpSendRequest(hRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, 0); + if (!bResults) { + SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("Error notifying the OpenSec manager. WinHttpSendRequest failed! ")); + return; + } + + // End the request. + //if (bResults) + // bResults = WinHttpReceiveResponse(hRequest, NULL); + + //DWORD dwSize = 0; + //LPVOID lpOutBuffer = NULL; + //if (bResults) { + // WinHttpQueryHeaders(hRequest, WINHTTP_QUERY_RAW_HEADERS_CRLF, WINHTTP_HEADER_NAME_BY_INDEX, NULL, &dwSize, WINHTTP_NO_HEADER_INDEX); + // // Allocate memory for the buffer. + // if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { + // lpOutBuffer = new WCHAR[dwSize / sizeof(WCHAR)]; + // // Now, use WinHttpQueryHeaders to retrieve the header. + // bResults = WinHttpQueryHeaders(hRequest, WINHTTP_QUERY_RAW_HEADERS_CRLF, WINHTTP_HEADER_NAME_BY_INDEX, lpOutBuffer, &dwSize, WINHTTP_NO_HEADER_INDEX); + // } + //} + //// Print the header contents. + //if (bResults) + // printf("Header contents: \n%S", lpOutBuffer); + //// Free the allocated memory. + //delete [] lpOutBuffer; + +} + +// +// Purpose: +// Sets the current service status and reports it to the SCM. +// +// Parameters: +// dwCurrentState - The current state (see SERVICE_STATUS) +// dwWin32ExitCode - The system error code +// dwWaitHint - Estimated time for pending operation, +// in milliseconds +// +// Return value: +// None +// +VOID ReportSvcStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode, DWORD dwWaitHint) { + static DWORD dwCheckPoint = 1; + // Fill in the SERVICE_STATUS structure. + gSvcStatus.dwCurrentState = dwCurrentState; + gSvcStatus.dwWin32ExitCode = dwWin32ExitCode; + gSvcStatus.dwWaitHint = dwWaitHint; + + if (dwCurrentState == SERVICE_START_PENDING) + gSvcStatus.dwControlsAccepted = 0; + else gSvcStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP; + + if ((dwCurrentState == SERVICE_RUNNING) || + (dwCurrentState == SERVICE_STOPPED)) + gSvcStatus.dwCheckPoint = 0; + else gSvcStatus.dwCheckPoint = dwCheckPoint++; + + // Report the status of the service to the SCM. + SetServiceStatus(gSvcStatusHandle, &gSvcStatus); +} + +// Purpose: +// Called by SCM whenever a control code is sent to the service +// using the ControlService function. +// +// Parameters: +// dwCtrl - control code +// +// Return value: +// None +// +VOID WINAPI SvcCtrlHandler(DWORD dwCtrl) { + // Handle the requested control code. + switch (dwCtrl) { + case SERVICE_CONTROL_STOP: + UnregisterDeviceNotification(ghDeviceNotify); + ReportSvcStatus(SERVICE_STOP_PENDING, NO_ERROR, 0); + // Signal the service to stop. + SetEvent(ghSvcStopEvent); + ReportSvcStatus(gSvcStatus.dwCurrentState, NO_ERROR, 0); + return; + + case SERVICE_CONTROL_INTERROGATE: + break; + + case SERVICE_CONTROL_DEVICEEVENT: + SvcReportEvent(EVENTLOG_INFORMATION_TYPE, _T("Received SERVICE_CONTROL_DEVICEEVENT")); + //NotifyOpenSecManager(); + break; + + default: + break; + } +} + +// +// Purpose: +// Logs messages to the event log +// +// Parameters: +// szFunction - name of function that failed +// +// Return value: +// None +// +// Remarks: +// The service must have an entry in the Application event log. +// +VOID SvcReportEvent(WORD type, LPTSTR szFunction) { + HANDLE hEventSource; + LPCTSTR lpszStrings[2]; + TCHAR Buffer[80]; + + hEventSource = RegisterEventSource(NULL, SVCNAME); + + if (NULL != hEventSource) { + if (type == EVENTLOG_ERROR_TYPE) + StringCchPrintf(Buffer, 80, TEXT("Error has occured. %s failed with %d"), szFunction, GetLastError()); + else + StringCchPrintf(Buffer, 80, TEXT("%s"), szFunction); + + lpszStrings[0] = SVCNAME; + lpszStrings[1] = Buffer; + + if (type == EVENTLOG_ERROR_TYPE) + ReportEvent(hEventSource, + type, // event type + 0, // event category + SVC_ERROR, // event identifier + NULL, // no security identifier + 2, // size of lpszStrings array + 0, // no binary data + lpszStrings, // array of strings + NULL); // no binary data + else + ReportEvent(hEventSource, + type, // event type + 0, // event category + SVC_ERROR, // event identifier + NULL, // no security identifier + 2, // size of lpszStrings array + 0, // no binary data + lpszStrings, // array of strings + NULL); // no binary data + + DeregisterEventSource(hEventSource); + } +} diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.h Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,3 @@ +#pragma once + +#include "resource.h" diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.ico Binary file server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.ico has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.rc Binary file server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.rc has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.vcxproj Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,102 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {B54F4A89-7357-4879-AE62-0825AD3E5974} + Win32Proj + OpenSecUSBEventSvc + + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + ..\OpenSecUSBEventSvcLog;%(AdditionalIncludeDirectories) + + + Console + true + winhttp.lib;setupapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + ..\OpenSecUSBEventSvcLog;%(AdditionalIncludeDirectories) + + + Console + true + true + true + winhttp.lib;setupapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.vcxproj.filters --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.vcxproj.filters Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,39 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.vcxproj.user --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.vcxproj.user Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/ReadMe.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/ReadMe.txt Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,62 @@ +======================================================================== + WIN32 APPLICATION : OpenSecUSBEventSvc Project Overview +======================================================================== + +AppWizard has created this OpenSecUSBEventSvc application for you. + +This file contains a summary of what you will find in each of the files that +make up your OpenSecUSBEventSvc application. + + +OpenSecUSBEventSvc.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +OpenSecUSBEventSvc.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +OpenSecUSBEventSvc.cpp + This is the main application source file. + +///////////////////////////////////////////////////////////////////////////// +AppWizard has created the following resources: + +OpenSecUSBEventSvc.rc + This is a listing of all of the Microsoft Windows resources that the + program uses. It includes the icons, bitmaps, and cursors that are stored + in the RES subdirectory. This file can be directly edited in Microsoft + Visual C++. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Visual C++ reads and updates this file. + +OpenSecUSBEventSvc.ico + This is an icon file, which is used as the application's icon (32x32). + This icon is included by the main resource file OpenSecUSBEventSvc.rc. + +small.ico + This is an icon file, which contains a smaller version (16x16) + of the application's icon. This icon is included by the main resource + file OpenSecUSBEventSvc.rc. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named OpenSecUSBEventSvc.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/Release/OpenSecUSBEventSvc.Build.CppClean.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/Release/OpenSecUSBEventSvc.Build.CppClean.log Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,12 @@ +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecusbeventsvc.pch +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\vc120.pdb +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\stdafx.obj +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecusbeventsvc.obj +c:\program files\opensecurity\server\windows\usbeventsvc\release\opensecusbeventsvc.exe +c:\program files\opensecurity\server\windows\usbeventsvc\release\opensecusbeventsvc.pdb +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecu.b54f4a89.tlog\cl.command.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecu.b54f4a89.tlog\cl.read.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecu.b54f4a89.tlog\cl.write.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecu.b54f4a89.tlog\link.command.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecu.b54f4a89.tlog\link.read.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecu.b54f4a89.tlog\link.write.1.tlog diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/Release/OpenSecUSBEventSvc.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/Release/OpenSecUSBEventSvc.log Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,5 @@ +Build started 12/3/2013 6:03:15 PM. + +Build succeeded. + +Time Elapsed 00:00:00.05 diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/Resource.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/Resource.h Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,31 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by OpenSecUSBEventSvc.rc +// + +#define IDS_APP_TITLE 103 + +#define IDR_MAINFRAME 128 +#define IDD_OPENSECUSBEVENTSVC_DIALOG 102 +#define IDD_ABOUTBOX 103 +#define IDM_ABOUT 104 +#define IDM_EXIT 105 +#define IDI_OPENSECUSBEVENTSVC 107 +#define IDI_SMALL 108 +#define IDC_OPENSECUSBEVENTSVC 109 +#define IDC_MYICON 2 +#ifndef IDC_STATIC +#define IDC_STATIC -1 +#endif +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS + +#define _APS_NO_MFC 130 +#define _APS_NEXT_RESOURCE_VALUE 129 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 110 +#endif +#endif diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/small.ico Binary file server/windows/USBEventSvc/OpenSecUSBEventSvc/small.ico has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/stdafx.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/stdafx.cpp Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// OpenSecUSBEventSvc.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/stdafx.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/stdafx.h Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,21 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include + +// C RunTime Header Files +#include +#include +#include +#include + + +// TODO: reference additional headers your program requires here diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvc/targetver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/targetver.h Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Build.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Build.txt Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,7 @@ +mc.exe OpenSecUSBEventSvcLog.mc +rc.exe /r OpenSecUSBEventSvcLog.rc +link -dll -noentry -out: ..\Release\OpenSecUSBEventSvcLog.dll OpenSecUSBEventSvcLog.res + +add to registry and make sure the path in .reg points to you actuall log.dll + +OpenSecUSBEventSvcLog.reg \ No newline at end of file diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecMgrLog.Build.CppClean.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecMgrLog.Build.CppClean.log Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,30 @@ +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\opensecmgrlog.pch +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\stdafx.obj +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\vc100.pdb +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\dllmain.obj +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\debug\opensecmgrlog.ilk +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\debug\opensecmgrlog.dll +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\opensecmgrlog.dll.intermediate.manifest +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\debug\opensecmgrlog.pdb +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\opensecmgrlog.dll.embed.manifest +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\opensecmgrlog.dll.embed.manifest.res +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\cl.command.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\cl.read.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\cl.write.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link-cvtres.read.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link-cvtres.write.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.5204-cvtres.read.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.5204-cvtres.write.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.5204.read.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.5204.write.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.command.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.read.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.write.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\mt.command.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\mt.read.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\mt.write.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\rc.command.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\rc.read.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\rc.write.1.tlog +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\vc100.idb +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\opensecmgrlog_manifest.rc diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecMgrLog.lastbuildstate --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecMgrLog.lastbuildstate Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,2 @@ +#v4.0:v100:false +Debug|Win32|c:\users\bartham\documents\visual studio 2010\Projects\OpenSecMgr\| diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecMgrLog.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecMgrLog.log Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,8 @@ +Build started 12/3/2013 2:02:13 PM. + 1>Project "C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\OpenSecMgrLog.vcxproj" on node 2 (Rebuild target(s)). + 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...". + 1>Done Building Project "C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\OpenSecMgrLog.vcxproj" (Rebuild target(s)) -- FAILED. + +Build FAILED. + +Time Elapsed 00:00:00.06 diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecUSBEventSvcLog.Build.CppClean.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecUSBEventSvcLog.Build.CppClean.log Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,14 @@ +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecusbeventsvclog.pch +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\vc120.pdb +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\vc120.idb +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\stdafx.obj +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\dllmain.obj +c:\program files\opensecurity\server\windows\usbeventsvc\debug\opensecusbeventsvclog.ilk +c:\program files\opensecurity\server\windows\usbeventsvc\debug\opensecusbeventsvclog.dll +c:\program files\opensecurity\server\windows\usbeventsvc\debug\opensecusbeventsvclog.pdb +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecu.8a2fcdf0.tlog\cl.command.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecu.8a2fcdf0.tlog\cl.read.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecu.8a2fcdf0.tlog\cl.write.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecu.8a2fcdf0.tlog\link.command.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecu.8a2fcdf0.tlog\link.read.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecu.8a2fcdf0.tlog\link.write.1.tlog diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecUSBEventSvcLog.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecUSBEventSvcLog.log Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,5 @@ +Build started 12/3/2013 6:03:49 PM. + +Build succeeded. + +Time Elapsed 00:00:00.03 diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/MSG00409.bin Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/MSG00409.bin has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.h Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,56 @@ + // The following are message definitions. +// +// Values are 32 bit values laid out as follows: +// +// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +// +---+-+-+-----------------------+-------------------------------+ +// |Sev|C|R| Facility | Code | +// +---+-+-+-----------------------+-------------------------------+ +// +// where +// +// Sev - is the severity code +// +// 00 - Success +// 01 - Informational +// 10 - Warning +// 11 - Error +// +// C - is the Customer code flag +// +// R - is a reserved bit +// +// Facility - is the facility code +// +// Code - is the facility's status code +// +// +// Define the facility codes +// +#define FACILITY_SYSTEM 0x0 +#define FACILITY_STUBS 0x3 +#define FACILITY_RUNTIME 0x2 +#define FACILITY_IO_ERROR_CODE 0x4 + + +// +// Define the severity codes +// +#define STATUS_SEVERITY_WARNING 0x2 +#define STATUS_SEVERITY_SUCCESS 0x0 +#define STATUS_SEVERITY_INFORMATIONAL 0x1 +#define STATUS_SEVERITY_ERROR 0x3 + + +// +// MessageId: SVC_ERROR +// +// MessageText: +// +// An error has occurred (%2). +// +#define SVC_ERROR ((DWORD)0xC0020001L) + + // A message file must end with a period on its own line + // followed by a blank line. diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.mc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.mc Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,30 @@ +MessageIdTypedef=DWORD + +SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS + Informational=0x1:STATUS_SEVERITY_INFORMATIONAL + Warning=0x2:STATUS_SEVERITY_WARNING + Error=0x3:STATUS_SEVERITY_ERROR + ) + + +FacilityNames=(System=0x0:FACILITY_SYSTEM + Runtime=0x2:FACILITY_RUNTIME + Stubs=0x3:FACILITY_STUBS + Io=0x4:FACILITY_IO_ERROR_CODE +) + +LanguageNames=(English=0x409:MSG00409) + +; // The following are message definitions. + +MessageId=0x1 +Severity=Error +Facility=Runtime +SymbolicName=SVC_ERROR +Language=English +%2. +. + +; // A message file must end with a period on its own line +; // followed by a blank line. + diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.reg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.reg Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,5 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application\OpenSecUSBEventSvc] +"EventMessageFile"="C:\\Program Files\\OpenSecurity\\server\\windows\\USBEventSvc\\Release\\OpenSecUSBEventSvcLog.dll" +"TypesSupported"=dword:00000007 diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.sdf Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.sdf has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.vcxproj Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,173 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8A2FCDF0-77C7-4423-926D-B36872648B32} + Win32Proj + OpenSecUSBEventSvcLog + OpenSecUSBEventSvcLog + + + + DynamicLibrary + true + Unicode + v120 + + + DynamicLibrary + true + Unicode + v120 + + + DynamicLibrary + false + true + Unicode + v120 + + + DynamicLibrary + false + true + Unicode + v120 + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;OPENSECMGRLOG_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + MachineX86 + + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;OPENSECMGRLOG_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;OPENSECMGRLOG_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;OPENSECMGRLOG_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + + + + + + + + + + false + false + + + + + false + false + + + + + + + Create + Create + Create + Create + + + + + + \ No newline at end of file diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.vcxproj.filters --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.vcxproj.filters Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,42 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + Resource Files + + + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.vcxproj.user --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.vcxproj.user Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/ReadMe.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/ReadMe.txt Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,48 @@ +======================================================================== + DYNAMIC LINK LIBRARY : OpenSecMgrLog Project Overview +======================================================================== + +AppWizard has created this OpenSecMgrLog DLL for you. + +This file contains a summary of what you will find in each of the files that +make up your OpenSecMgrLog application. + + +OpenSecMgrLog.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +OpenSecMgrLog.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +OpenSecMgrLog.cpp + This is the main DLL source file. + + When created, this DLL does not export any symbols. As a result, it + will not produce a .lib file when it is built. If you wish this project + to be a project dependency of some other project, you will either need to + add code to export some symbols from the DLL so that an export library + will be produced, or you can set the Ignore Input Library property to Yes + on the General propert page of the Linker folder in the project's Property + Pages dialog box. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named OpenSecMgrLog.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Release/OpenSecUSBEventSvcLog.Build.CppClean.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Release/OpenSecUSBEventSvcLog.Build.CppClean.log Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,12 @@ +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecusbeventsvclog.pch +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\vc120.pdb +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\stdafx.obj +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\dllmain.obj +c:\program files\opensecurity\server\windows\usbeventsvc\release\opensecusbeventsvclog.dll +c:\program files\opensecurity\server\windows\usbeventsvc\release\opensecusbeventsvclog.pdb +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecu.8a2fcdf0.tlog\cl.command.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecu.8a2fcdf0.tlog\cl.read.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecu.8a2fcdf0.tlog\cl.write.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecu.8a2fcdf0.tlog\link.command.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecu.8a2fcdf0.tlog\link.read.1.tlog +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecu.8a2fcdf0.tlog\link.write.1.tlog diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Release/OpenSecUSBEventSvcLog.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Release/OpenSecUSBEventSvcLog.log Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,8 @@ +Build started 12/3/2013 6:03:36 PM. + 1>Project "C:\Program Files\OpenSecurity\server\windows\USBEventSvc\OpenSecUSBEventSvcLog\OpenSecUSBEventSvcLog.vcxproj" on node 2 (Clean target(s)). + 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppClean.targets(76,5): warning : Access to the path 'c:\program files\opensecurity\server\windows\usbeventsvc\release\opensecusbeventsvclog.dll' is denied. + 1>Done Building Project "C:\Program Files\OpenSecurity\server\windows\USBEventSvc\OpenSecUSBEventSvcLog\OpenSecUSBEventSvcLog.vcxproj" (Clean target(s)). + +Build succeeded. + +Time Elapsed 00:00:00.03 diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/dllmain.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/dllmain.cpp Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,19 @@ +// dllmain.cpp : Defines the entry point for the DLL application. +#include "stdafx.h" + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/stdafx.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/stdafx.cpp Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// OpenSecMgrLog.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/stdafx.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/stdafx.h Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include + + + +// TODO: reference additional headers your program requires here diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/targetver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/targetver.h Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.dll Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.dll has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.log Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,17 @@ +Build started 12/3/2013 2:05:52 PM. + 1>Project "C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\OpenSecMgrLog.vcxproj" on node 2 (Rebuild target(s)). + 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(381,5): warning MSB8028: The intermediate directory (x64\Debug\) contains files shared from another project (OpenSecMgrLog.vcxproj). This can lead to incorrect clean and rebuild behavior. + 1>ClCompile: + C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe /c /Zi /nologo /W3 /WX- /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _USRDLL /D OPENSECMGRLOG_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yc"stdafx.h" /Fp"x64\Debug\OpenSecUSBEventSvcLog.pch" /Fo"x64\Debug\\" /Fd"x64\Debug\vc120.pdb" /Gd /TP /errorReport:prompt stdafx.cpp + stdafx.cpp + C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe /c /Zi /nologo /W3 /WX- /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _USRDLL /D OPENSECMGRLOG_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"x64\Debug\\" /Fd"x64\Debug\vc120.pdb" /Gd /TP /errorReport:prompt dllmain.cpp + dllmain.cpp + Link: + C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\x64\Debug\OpenSecUSBEventSvcLog.dll" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\x64\Debug\OpenSecUSBEventSvcLog.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\x64\Debug\OpenSecUSBEventSvcLog.lib" /MACHINE:X64 /DLL x64\Debug\dllmain.obj + x64\Debug\stdafx.obj + OpenSecMgrLog.vcxproj -> C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\x64\Debug\OpenSecUSBEventSvcLog.dll + 1>Done Building Project "C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\OpenSecMgrLog.vcxproj" (Rebuild target(s)). + +Build succeeded. + +Time Elapsed 00:00:00.95 diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/CL.read.1.tlog Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/CL.read.1.tlog has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/CL.write.1.tlog Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/CL.write.1.tlog has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/OpenSecMgrLog.lastbuildstate --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/OpenSecMgrLog.lastbuildstate Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit +Debug|x64|C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\| diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/cl.command.1.tlog Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/cl.command.1.tlog has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/link.command.1.tlog Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/link.command.1.tlog has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/link.read.1.tlog Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/link.read.1.tlog has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/link.write.1.tlog Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/link.write.1.tlog has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/CL.read.1.tlog Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/CL.read.1.tlog has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/CL.write.1.tlog Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/CL.write.1.tlog has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/OpenSecUSBEventSvcLog.lastbuildstate --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/OpenSecUSBEventSvcLog.lastbuildstate Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit +Debug|x64|C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\| diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/cl.command.1.tlog Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/cl.command.1.tlog has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/link.command.1.tlog Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/link.command.1.tlog has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/link.read.1.tlog Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/link.read.1.tlog has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/link.write.1.tlog Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/link.write.1.tlog has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.Build.CppClean.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.Build.CppClean.log Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,7 @@ +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\dllmain.obj +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\stdafx.obj +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\opensecmgrlog.ilk +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\opensecmgrlog.pch +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\vc120.idb +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\opensecmgrlog.pdb +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\vc120.pdb diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.dll Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.dll has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.ilk Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.ilk has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.pch Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.pch has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.pdb Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.pdb has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/dllmain.obj Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/dllmain.obj has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/stdafx.obj Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/stdafx.obj has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/vc120.idb Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/vc120.idb has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/vc120.pdb Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/vc120.pdb has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/Release/OpenSecUSBEventSvcLog.dll Binary file server/windows/USBEventSvc/Release/OpenSecUSBEventSvcLog.dll has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/USBEventSvc.opensdf Binary file server/windows/USBEventSvc/USBEventSvc.opensdf has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/USBEventSvc.sdf Binary file server/windows/USBEventSvc/USBEventSvc.sdf has changed diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/USBEventSvc.sln --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/windows/USBEventSvc/USBEventSvc.sln Tue Dec 03 18:04:46 2013 +0100 @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Express 2013 for Windows Desktop +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenSecUSBEventSvcLog", "OpenSecUSBEventSvcLog\OpenSecUSBEventSvcLog.vcxproj", "{8A2FCDF0-77C7-4423-926D-B36872648B32}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenSecUSBEventSvc", "OpenSecUSBEventSvc\OpenSecUSBEventSvc.vcxproj", "{B54F4A89-7357-4879-AE62-0825AD3E5974}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8A2FCDF0-77C7-4423-926D-B36872648B32}.Debug|Win32.ActiveCfg = Debug|Win32 + {8A2FCDF0-77C7-4423-926D-B36872648B32}.Debug|Win32.Build.0 = Debug|Win32 + {8A2FCDF0-77C7-4423-926D-B36872648B32}.Debug|x64.ActiveCfg = Debug|x64 + {8A2FCDF0-77C7-4423-926D-B36872648B32}.Debug|x64.Build.0 = Debug|x64 + {8A2FCDF0-77C7-4423-926D-B36872648B32}.Release|Win32.ActiveCfg = Release|Win32 + {8A2FCDF0-77C7-4423-926D-B36872648B32}.Release|Win32.Build.0 = Release|Win32 + {8A2FCDF0-77C7-4423-926D-B36872648B32}.Release|x64.ActiveCfg = Release|x64 + {8A2FCDF0-77C7-4423-926D-B36872648B32}.Release|x64.Build.0 = Release|x64 + {B54F4A89-7357-4879-AE62-0825AD3E5974}.Debug|Win32.ActiveCfg = Debug|Win32 + {B54F4A89-7357-4879-AE62-0825AD3E5974}.Debug|Win32.Build.0 = Debug|Win32 + {B54F4A89-7357-4879-AE62-0825AD3E5974}.Debug|x64.ActiveCfg = Debug|Win32 + {B54F4A89-7357-4879-AE62-0825AD3E5974}.Release|Win32.ActiveCfg = Release|Win32 + {B54F4A89-7357-4879-AE62-0825AD3E5974}.Release|Win32.Build.0 = Release|Win32 + {B54F4A89-7357-4879-AE62-0825AD3E5974}.Release|x64.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff -r 088f4b20dbbc -r 903480cebdfb server/windows/USBEventSvc/USBEventSvc.v12.suo Binary file server/windows/USBEventSvc/USBEventSvc.v12.suo has changed