Tuesday, September 24, 2013

Warning when someone tries to connect to a share on my computer

In windows you can attach tasks to events.
You can attach a task to an audit event that represents connections to the local host shares.
You will need to configure the filter using XML and filter share connections events (5140) and discard events from the local host itself to connect to itself (many programs try to connect to c$ share like firefox when opening a browse file dialog and uploading files to forms).

This is the filter
<QueryList> <Query Id="0" Path="Security"> <Select Path="Security"> *[System[(EventID=5140)]] and *[EventData[(IpAddress!='127.0.0.1')]]</Select> </Query> </QueryList>

After the filter is built, attach the task of sending email or an on screen message "some one is trying to connect to my computer - see event log for details"


Monday, August 26, 2013

Modern password security, hash algorithms, rainbow tables and how to correctly salt

see this excellent site (which is also an online rainbow password checker):

https://crackstation.net/hashing-security.htm

Monday, July 22, 2013

Using Selenium in a Java Dynamic Web Project

The issue with selenium is that you can use the selenium-server-standalone-2.33.0.jar in a simple java project (e.g., console)
as the only jar and everything will work fine,
but when you try to move your code to a java dynamic web project (e.g., JavaEE / Tomcat) it will give you hell.
specifically it will give you the following error messages:

java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver
java.lang.ClassNotFoundException: org.openqa.selenium.WebDriver


Now I went through many hours trying to understand if my problem was in importing the lib to the correct place
(WEB-INF/lib) or that the "java build path" libraries tab is correct. Also checked "deployment assembly".

All this didn't help me, so I went down to basics, i opened the "java resources"->libraries->"web app libraries"->"selenium-server-standalone-2.33.0.jar"
and looked for org.openqa.selenium.WebDriver, and didn't find it !

So then i thought, well this probably is not such a standalone jar at all.
The solution - don't use the standalone selenium jar, instead use the small non-standalone selenium jar (selenium-java-2.33.0.jar or selenium-server-2.33.0)
and also use all the jars it depends on.

Assuming you are going for selenium-java-2.33.0.jar (which is for local running VS selenium-java-2.33.0.jar which allow local and remote running)
You download the full zip from http://docs.seleniumhq.org/download/ under "Selenium Client & WebDriver Language Bindings" java-> 'download' link.
At the time of writing this article it was http://selenium.googlecode.com/files/selenium-java-2.33.0.zip

Open the zip and copy selenium-java-2.33.0.jar and all the libs in the libs dir into your java dynamic web project's WebContent->WEB-INF->lib dir.
(no need to change project build path or anything this dir should be automatically in there).

Hope I saved many hours of work from other people in this post !






Wednesday, January 16, 2013

How to remove McAfee and McAfee site advisor

McAfee anti virus is sort of a virus by itself on your computer in the way that it is so hard to remove it even if you have administrative privillages.
It is sad that McAfee took all their expertise and knowledge in virus stubbornness in uninstalling and implemented the same techniques to make uninstalling their own product so hard.

If you can't remove McAfee using Add/Remove in windows, just download this tool:

http://download.mcafee.com/products/licensed/cust_support_patches/MCPR.exe

close all your apps, run it, and then use Add/Remove to clean up any McAfee products on your system.

If it is still stuck there or site advisor is not removed after removing everything, try running the following command line:

C:\Program Files (x86)\McAfee\Common Framework>FrmInst.exe -forceuninstall