Tuesday, September 27, 2011

Java, Eclipse, Pydev, Oh My!

Installing Eclipse with PyDev

Just do the following:

- Install Java
- Install Eclipse IDE  (Requires Java to Execute)
- Install PyDev through Eclipse ( Uses the Update Manager)

These urls will be needed when updating with the Eclipse update manager.
In order to successfully update the Eclipse IDE you must do the following:

Help -->
Install New Software.. -->
Add -->
Type: http://pydev.org/updates

Eclipse is an awesome IDE ( Integrated Development Environment)!

After the Eclipse IDE has been installed, you must start a new project using PyDev and configure the C:\python27\python.exe as the executable for the interpreter.

Sample code using Eclipse!



Enjoy!

Monday, September 26, 2011

Python27.dll = Milk Carton!

Windows 7 - Fresh out the Box - Part 2!

Well, fighting with Windows is bluntly annoying. I've been researching debugging, python, ctypes, and various other tools used for reverse engineering, malware analysis, and exploit development. attempting to install Immunity-Debugger which requires Python to run correctly and the folks over at Immunity have bundled the install together rather effortlessly. Props!

On the flip side, the research of the 32 bit architecture requires analysis and examination from both Winblows and Linux. Upon installing Immunity-debugger for Winblows, I proceeded to double click the executable unprepared for the time travel to a parallel dimension of pist off I've never adventured to.

Rather than redeeming my ticket for my trip and getting my time, effort, and sanity back, I decided to trouble-shoot. Windows decided it had beef with the python27.dll file. Apparently this .dll decided to play hide and seek today in Windows land, which kind of reminds me a Pink Floyd song...

After some research, corrupted system files, sfc /scannow, several reboots, regsvr32, and many failed installations later I tried to install a different/newer/stable version of python (3.2.2). I noticed during the installation the python installation asks the end user if you'd like to install for everyone or just me. Well, considering the fact I'm a security savvy kinda guy I decided maybe not everyone should have access to the suite/tool I'm using to find vulnerabilities and write exploits.

Instead of displaying some type of useful output, let's get ready for a fun game of name that error. Changing the file permissions on the file doesn't appear to the fix the issue and registering the .dll doesn't either. How about an un-install of python and allow access to your installation to everyone.

Microsoft, I knew you had a fix..

To be continued..

Monday, September 12, 2011

%PUBLIC%\Desktop

Windows 7 - Fresh out the Box!


Not wanting to completely destroy the newly purchased Windows 7 operating system, I wanted to tinker a bit. Attempting to install VM-Ware Workstation on Windows 7, I was presented with quite a challenging task. After proceeding through the standard installation steps, I was delightfully prompted/alerted that the following network location: %DESKTOP%\Desktop was not accessible?

Imagine that...

At this point, the basic operation/configuration tasks in Windows have proved to be rather cumbersome. Already highly frustrated with the fact I've given Windows 7 the benefit of the doubt and neglected to install any flavor of LINUX ..o0( BackTrack 5). I figured would deploy a much needed dose of #!/bin/bash in a virtual environment. However, this left me loathing M$ even more than previously mentioned.

After scouring the  dark alleys and corners of the web, several M$ knowledge base articles later, a downloaded MicrosoftFixit50356.msi, a couple peeks at the registry,  a potentially malicious .vbs file from the depths of the inter-webs, a code review, multiple reboots, and a cup of JOE, I stumbled across the following solution.

How to resolve M$'s error 1606 while installing VM-Ware Workstation!
  1. Go to Start --> Run, type regedit, and click OK.
  2. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders 
  3. Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders.
  4. Right Click on the corresponding registry value and select "Modify". Change the existing %PUBLIC% to the following %USERPROFILE% as shown below.

    Windows XP / Server 2003

    Name Data value
    Desktop %USERPROFILE%\Desktop
    My Music %USERPROFILE%\My Documents\My Music
    My Pictures %USERPROFILE%\My Documents\My Pictures
    Personal %USERPROFILE%\My Documents

    Windows Vista / 7
     / Server 2008

    Name Data value
    Desktop%USERPROFILE%\Desktop
    My Music %USERPROFILE%\Music
    My Pictures %USERPROFILE%\Pictures
    Personal %USERPROFILE%\Documents