Friday, April 24, 2009

Sample Messaging Examples

This is a simple Messaging Client/Server utilizing the spydrphi.messaging class. Feel free to utilize these as guides. They attempt to show most of the functionality.

These files can be found on the wiki:
Client here (http://wiki.spydrphi.com/Home/utilities/messaging-example/Test.Messaging.Client.zip?attredirects=0).
Server here (http://wiki.spydrphi.com/Home/utilities/messaging-example/Test.Messaging.Server.zip?attredirects=0).

spydrphi.errors

This is a very simple class that exposes a couple of simple error handling sub methods:
spydrphi.errors
Public Class msgbox_error
Public Sub HandleError(ex as exception)
Public Sub HandleError(sCustom As String) [custom error string]
Public Sub HandleError(ex as Exception, sCustom as String) [exception and custom string]
Public Class file_error
Public Property FileLocation (default c:\)[where to write the log file]
Public Sub HandleError(ex as Exception)
Public Sub HandleError(sCustom As String) [custom error string]
Public Sub HandleError(ex as Exception, sCustom as String) [exception and custom string]

I utilize this in many of my programs and classes. Now you can too if you want it. You can find it on the wiki here (http://wiki.spydrphi.com/Home/utilities/spydrphi-errors/spydrphi.errors.zip?attredirects=0).

Thursday, April 23, 2009

spydrphi.messaging

This is a simple class that I wrote (VB.NET 1.1) to allow for simple TCP Client/Server message and file transfers.
spydrphi.messaging.dll
SimpleTCPClient Class
Public Functions:
SendMessage(IPAddress As String, Port As Integer, Message As String) As Boolean
SendMessage(IPAddress As String, Port As Integer, FileName As String, OpenFileStream As FileStream) As Boolean
[The FileName string in the second option is limited to 52 characters including extension]
[The OpenFileStream requires that the client open the file and pass the file stream handle to the function, do not pass an empty file stream (I might change this later, but the way it works for now)]
SimpleTCPServer Class
Public Properties:
Port As Integer (default 10019)
FileLocation As String (default c:\) - If the server is receiving files
Output As String - Holds data received, should be read by your server client w/ Waiting
Waiting As Boolean - Value is set to true when Output contains data to be read, reset to False when Server Client read is complete
Public Sub Method:
StartServer()

These classes both utilize the spydrphi.errors (msgbox_error) class, which is also included in the package.

The spydrphi.messaging class can be located on the wiki here (http://wiki.spydrphi.com/Home/utilities/spydrphi-messaging/spydrphi.messaging.zip?attredirects=0).

Wednesday, April 22, 2009

Domain User Status Testing

Attached here is a little script I wrote a bit ago that will take a User List and will query one or two domains to return the status of those users. There are other configurable settings such as e-mail of report, etc. All of the options to drive the program are in the Constants at the top of the program. As this is a VBScript program, feel free to modify as needed. For the e-mail option, AspEmail.dll is required and can be downloaded from Persists Software here(http://www.persits.com/). The free version is all that is required for this. If you choose to use the Persists software and want to use the mailing feature, line 93 of the .vbs file must be uncommented (remove the ' at the beginning of the line).

The program can be found on the wiki here (http://wiki.spydrphi.com/Home/utilities/test-domain/Test.Domain.zip?attredirects=0).

Spoof Oracle Connections

This is a java script I wrote a while back, that will allow the user to run an Oracle query with spoofed session values for Program, OS User and Machine Name. These values are stored in the V$Session view in Oracle, while these values (and others) can be easily set ... they are still utilized in many cases as part of authentication. This script can help audit additional control points on any systems that use all or some of these values as part of authentication.

This file can be found on the wiki here.

Pete Finnigan

Having just finished his Oracle Auditing class, I figured I should give a shout out to Pete Finnigan. This guy is an oracle genius who is all over how Oracle is compromised, the best ways to secure it, as well as how to audit for these vulnerabilities. Check out his weblog as well as his tools here on http://www.petefinnigan.com/.

Welcome

Welcome all to my new blog dedicated to a couple of different areas. On one hand there will be discussions around various security related topics. On the other, I will be posting helpful tools and utilities (both security focused and other) that I write, as well as links to tools I find from others. Feel free to let me know questions, comments, etc ... spydrphi (at) spydrphi (dot) com.