Hack a Mobile Phone with Linux and Python



Managed to breath life back into my old hand-me-down Nokia N70. The phone was having White Screen of Death (WSOD) one too many, a new display IC fixed that. The original nokia battery (Nokia BL-5C) started to swell and needed to be replace.

Now the old war horse is battle ready, let me hook it up to my laptop via a bluetooth link and do something useful with Python on S60 series.
$ hciconfig reset hci0:

Type: USB

BD Address: 00:21:86:A8:BF:03

ACL MTU: 310:10

SCO MTU: 64:8

UP RUNNING PSCAN ISCAN

RX bytes:1260 acl:0 sco:0 events:34 errors:0

$ hcitool dev

Devices: hci0 00:21:86:A8:BF:03

$ sdptool add --channel=2 SP

Serial Port service registered

# Now make sure the Python bluetooth console is running

$ rfcomm listen rfcomm2 2 In your phone,

make sure bluetooth is on,

then go to the Python application and then select the Bluetooth Console.

Select from the list of available devices your computer's bluetooth adapter (you might need to select search even if you think you have already defined the pairing).

If the operation is successful, you should see something similar to the following on your computer's shell:

* Waiting for connection on channel 2
* Connection from 00:11:9F:BE:47:CA to /dev/rfcomm2
* Press CTRL-C for hangup

# Change to different terminal and connect to the device with screen.

$ screen /dev/rfcomm2

# Run basic tests.
print u"hello"

hello

>>>

>>>

import appuifw >>>

appuifw.note(u"hello world")

>>>

This Python S60 Bluetooth Console wiki page provides more step by step intrusions of the whole process.

reference : http://famehack.wordpress.com/2011/02/20/hack-a-mobile-phone-with-linux-and-python/

hashchecker.py

well. too long im not update my blog. now i will update again with my tool, my tool called with

hashcheker.py

this tool for cheking md5 from web hashchecker.de.

this my c0de:
#!/usr/bin/python
#This tool just for crack your md5 password
#This application not stable in regex
#
#programmer : kiddies A.k.A peneter
#email : kecoak2004@yahoo.com
#blog : http://devilz-kiddies.blogspot.com
#
#thanks : mywisdom, gunslinger, jimmyromanticdevil, 5ynl0rd(my masta) and you
#community : devilzc0de, anti-jasakom, jasakom, echo, codecall, leetcoder and all
#special thanks for you honey vera. love you


import urllib2, urllib, re, time
import sys, os

if sys.platform == 'linux-1386' or sys.platform == 'linux2' or sys.platform == 'darwin':
SysCls = 'clear'
else:
SysCls = 'cls'

os.system(SysCls)
print '''
######################################################################
# DDDDD iii lll 00000 dd #
# DD DD eee vv vv lll zzzzz cccc 00 00 dd eee #
# DD DD ee e vv vv iii lll zz cc 00 00 dddddd ee e #
# DD DD eeeee vvv iii lll zz cc 00 00 dd dd eeeee #
# DDDDDD eeeee v iii lll zzzzz ccccc 00000 dddddd eeeee #
# #
# #
# This Tool for cracking MD5 password #
# Programmer : kiddies A.k.A peneter Devilzc0de BlackHat Edition #
######################################################################\n\n'''
hash_crack = raw_input('input your hash : ')
url = 'http://hashchecker.de/hash.cgi?action=check&wert=1&hash=' + hash_crack
params = {'hash':hash_crack}
enc = urllib.urlencode(params)
opening = urllib2.urlopen(url, enc)

page = opening.read()

result = re.search(r'', page)

print result.group()

opening.close()



my tool have a bug in regex. if yopu can fix this problem please contact me in my email
movax30@hotmail.com. thanks

Twitter Console Version 0.1



this software made by kiddies. this tool can be update status in twitter via console and look friends and waht they status..

this version 0.1 twitter console.

your comment and critical can be sent to my email or give comment here
your comment will be make this tool perfectly

source:
#!/usr/bin/python

#This tool just for fun
#thanks : mywisdom, gunslinger_, flyff666, petimati, synlord(get your honey dude :p), jimmy, whitehat and you !
#special made : devilzc0de
#email : kecoak2004@yahoo.com
#blog : http://devilz-kiddies.blogsport.com and http://kiddiescode.wordpress.com
#forum thanks : devilzc0de, jasakom, antijasakom, void-labs, and all community
#special thanks: for my lovely(verawati), you always beside me when im sad, fall and happy

import twitter
import time

#twitter connect
print """
####################################################
#~|~ o_|__|_ _._ |~ _ ._ _ _ | _ /\ '| #
# | \/\/| | | }_| |_(_)| |_\(_)|}_ \/ \/o | #
# #
# twitter console version 0.1 #
# developed by kiddies A.k.A peneter #
####################################################
"""

user_name = raw_input("please insert your username or email : ")
pass_word = raw_input("please insert your password : ")
try:
connect = twitter.api(username = user_name, password = pass_word)
print "your twitter account was connected"
print "what do you wanna do ? "
print "[1]Update your wall"
print "[2]Look your frieds wall"
choose = raw_input("coose 1 or 2 : ")
if choose == "1":
wall = raw_input("input your wall message : ")
update = connect.PostUpdate(wall)
print "your twitter wall have been updated : %s " % wall
print "Thanks for using Twitter Console"
if choose == "2":
wall_look = connect.GetFriends()
for wall in wall_look:
look = wall.screen_name + wall.status.text
time.sleep(50)
print look
else:
print "[-]Back to Main Menu"


except ImportError:
print "Please check twitter module"
print "Please check your Connection"
print "Please check your username or password, may be those invalid"

Basic Linux security

Computer security has become a critical subject in information technology system these days. If we looked back in history, the security threat has started a long time ago during 1970s when telephone system has been hacked. Many computer crimes happened and as a result, the Computer Fraud and Abuse Act has been made in 1980s. As technology advanced, the evolution of computer networking and the born of Internet, the threats to information and networks have risen significantly. The well-known harassment and destructive attacks are denial of service (DOS), mail bombs and list-linking, viruses, worms and Trojan horses.

Many efforts have been taken to improve computer security including the use of a network and security tools, control user access using permissions and passwords, data encryptions, and virus detectors. Other approaches to improve computer security involve secure operating systems, security architecture, security by design, secure coding and application.
Physical security

The purpose of security is to prevent unauthorized access into the system. This involves securing the physical and network access. Securing the physical access means to limit who can physically access your system, server room and workstations. It's been estimated that 80% of intrusions initiated by insiders. Securing physical access can be made by implementing a restricted area to the network operation centers and developing security policy controls.

Another way of securing the physical access into the system is to secure network hardware such as routers, bridges and switches from local users. Many network hardware have password issue which provide the means to perform onside password recovery. Several steps can be taken such as setting administrative and user password by overwrite the default password, enabled encryption, disable unwanted service such as telnet, and use security utility options if provided by the network hardware.

If your servers and security hardware are secured, intruder will look at other vulnerabilities which are workstation and user. Securing workstation can be made with BIOS and console passwords. For the users part, they must be given security knowledge such as never reveal their password to anyone else, never leave their computer unlock, and so on and alert them with security threats from time to time.
Linux network security

Securing the network access is securing access to the operating system remotely. One of the network security threat is malicious code, such as virus and Trojan which create a backdoor in your system. There are many file integrity checking software available for Linux. Some of them are Tripwire, TAMU, Aide and ATP.

Other network security attack is sniffers and network monitoring tools. Sniffers are very dangerous because they can capture sensitive data such as passwords and confidential information.

Scanners are also a high risk tool use by attacker to scan your system and network. To protect your network and system from scanner you can use a firewall and other tools such as IcmpInfo, scan-detector and klaxon.

Another way of attacking a network is spoofing attack. There are TCP and IP spoofing, ARP spoofing and DNS spoofing.

reference:http://www.basicconfig.com/linuxsecurity

Tunnel Everything through SSH

n this Tutorial I'll cover how you can tunnel any TCP traffic through an encrypted SSH connection or a SOCKS server, even if a certain program doesn't support proxying of connections natively.

The only requirement for SSH tunneling to work is a shell account on a machine connected to the internet (and, optionally, a HTTP Proxy server). I will refer to this account as your server (it doesn't matter if you may not become root).
Tunneling HTTP

In case you just want to tunnel HTTP traffic (to surf safely, to let the request appear to originate from a different IP and/or to not disclose HTTP clear text passwords to your LAN) best practise is to set up Privoxy on your server. By default, Privoxy binds to 127.0.0.1:8118 (thus only allowing connections from localhost), which is good for us. No configuration must be done for this.

The next step is to establish a tunnel from your computer to your server's Privoxy. That is done with the following SSH command:

ssh -NL 8118:localhost:8118 user@server

This command opens a tunnel on your computer: All connections to port 8118 will be forwarded (encrypted, of course) over the SSH connection and come out at your server's port 8118 (where Privoxy is running).

Once you have established the connection you will want to edit your browser's proxy settings accordingly. Just set the HTTP (and, with some browsers, the HTTPS) proxy to localhost, port 8118.
Advantages

The great advantage over SOCKS tunneling (see below) is, that even the DNS requests are made from your server. No-one on your LAN can gather information on what kind of site you're surfing. Another advantage is that Privoxy already filters out some advertisements and removes sensitive headers from your requests.
Tunneling Arbitrary Protocols (Dynamic Forward/SOCKS)

If you want to tunnel not just HTTP traffic but arbitrary other TCP protocols as well, a HTTP Proxy isn't adequate any more. Instead, you'll have to set up a SOCKS proxy. That also is possible with SSH:
Setting up the SSH proxy

Setting up the SSH SOCKS proxy is really easy. On your computer, just enter the following command:

ssh -ND 3333 user@server

That command establishes a connection to your server, logs in as user user (you'll have to enter your password though, of course) and then starts a little SOCKS proxy on your server.

On your computer, all connections to port 3333 will be forwarded over the secure SSH channel and will then be forwarded by the proxy to their destination.

Now you'll have to configure the program you want to connect through that tunnel to use localhost, port 3333 as it's SOCKS server (if you have the choice, select SOCKS version 5).

Not many programs support SOCKS proxy forwarding natively (hardly any CLI programs). But there is a workaround for that: tsocks. It enables arbitrary programs which don't support the SOCKS protocol natively to establish connections via a SOCKS server.
How tsocks works

On your computer, install the tsocks program.

I won't go into detail about how this program works, but it basically does the following:

* Before the actual program is loaded tsocks loads its own shared library.
* This library overwrites the kernel's connect() function and replaces it with its own.
* Whenever the program tries to send a request the request is forwarded through your proxy server (and then over the secure tunnel).

All this is done through setting the environment variable LD_PRELOAD to /usr/lib/libtsocks.so.

The tsocks program itself is just a simple shell wrapper script. All the actual redirecting stuff is done via the library.
Editing the /etc/tsocks.conf

Now you'll have to edit the file /etc/tsocks.conf to relay all connections through your proxy. Open the file and delete all lines. Then enter just the following two lines:

server = 127.0.0.1
server_port = 3333

If you may not become root ...

... just enter the two lines from above into a file called .tsocks.conf and place it in your home directory. Then, write a little shell script:

#!/bin/sh

TSOCKS_CONF_FILE=$HOME/.tsocks.conf
export TSOCKS_CONF_FILE
exec tsocks "$@"

I call this script viaservername. Place this script in a directory contained in your $PATH and make it executable.
Tunneling Connections

For programs who natively support proxying connections (e.g. Mozilla Firefox) you can now set the proxy address to localhost port 3333. I don't recommend to do that for browsers; instead, use HTTP tunneling (see above).

All other programs which's connections you want to tunnel through your server are prefixed with tsocks. This would look like some of the following program calls (if you wrote a shell script, use that instead of tsocks):

tsocks dog http://www.google.com
tsocks netcat example.com 80
tsocks irssi -c irc.freenode.net -p 6667

If you call tsocks without parameters it executes a shell witht the LD_PRELOAD environment variable already set and exported. That means that every program called from this shell will be redirected through the external server and every subsehll started from this shell will also have the LD_PRELOAD variable set. So if you started tsocks directly after logging in all your traffic would be redirected through your external server.
Example

$ cat =myip
#!/bin/sh
lynx -dump http://tnx.nl/ip

$ ssh -fND 3333 xxx@feh # -f: goes to background after prompting for password
xxx@feh.name's password:

$ IP=`myip`; host $IP
Name: p54XXXX8B.dip.t-dialin.net
Address: 84.143.XXX.XXX

$ IP=`tsocks myip`; host $IP
16:15:23 libtsocks(26802): Call to connect received on completed request 3
Name: feh.name
Address: 217.160.108.109

Have fun!

reference: http://www.plenz.com/tunnel-everything

Making your Home Computer / Dedicated Computer your own Web Server!!!

In this tutorial we will learn how to make your personal web server from a Home Computer or a Dedicated Computer using Windows 2000, Windows XP and Windows 2003. In the end we will have asp and php extensions installed. Also have a very commonly used program called mysql (Database Management) Lets get started!

1. Installing Internet Information Services (IIS)
Note: Have your Windows XP or Windows 2000 CD Inside the CD-Rom Drive. That way it just installs the software with out asking you to place it in.

Start > Settings > Control Panel > Add & Remove Programs
A window is going to pop-up, on the left hand side a button titled "Add/Remove Windows Components"
Another window should pop-up and look something like this:



Next to Application Server (Windows 2003) or Internet Information Services ( Windows XP)
Click so the check mark is showing. (Advanced Installation) Click on detail and select any other software you might want to use later on.
Now click Next and the installation should start.
Once IIS is installed on your machine you can view your home page in a web browser by typing http://localhost
You can also change localhost for the name of your computer or if a dedicated computer use IP address into the address bar of your web browser.



Note: Your default web directory to place your web site in is CInetpub\wwwroot (Place your website files there)

2. Installing PHP & Configuring
Note: Find the latest PHP-Installer at http://www.php.net/downloads I used PHP 5.0.3 installer [2,267Kb]
Note: First check what IIS# you have installed by going: Start > Settings > Administrative Tools > Internet Information Services (IIS) Manager



On the top right under "Version" Remember that! you will need it when installing php!

Now run the executable installer a pop-up window should come up:



Note: Windows 2003 IIS6, Windows XP IIS5.1, Windows 2000 Unknown
Browse to your desired directory ( I suggest keeping it default for the sake of this tutorial) > Next > Select IIS# > Next
The installation wizard gathers enough information to set up the php.ini file, and configure certain web servers to use PHP.
Once the installation has completed, the installer will inform you if you need to restart your system, restart the server, or just start using PHP.
Note: This istaller configures your Internet Information Services (IIS)

Make a php page "phpinfo.php" and dump this code inside:


// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);

?>


Save it to: CInetpub\wwwroot open browser to: http://localhost/phpinfo.php
PHP IS INSTALLED!

3. Download the latest Mysql Server install from: http://dev.mysql.com/downloads/ in my case I downloaded the Recommended version "MySQL 4.1 -- Generally Available (GA) release (recommended)"

Now run the exe and you should get a pop-up window similar to this:



Click Next > Next >
Now there's a section where it ask you to make a mysql.com account select third one down "Skip Sign-Up"
Click Finish! Now the Configuration Wizard should pop-up Click Next > Detailed Configuration
Now you should be here:



If your running it on your own pc "Select Developer Machine" If on a dedicated server chose "Dedicated MySQL Server Machine"
Click Next > Next > Next
Mysql Server Instance Configuration Section! If your going to run your test site on this chose "Manual Settings and put 10" for a couple of users "Decission Support" If a Dedicated server "Online Transaction Processing" Click Next
Next > Next > Should be here:



Make sure you select "Include Bin Dirrectory in Windows PATH" Click Next!
Now type in your Root Password. Now click Next and Execute.

If you want to go the mile dump something like phpmyadmin in your CInetpub\wwwroot for easy access of your databases.
Note: That's something we wont get into in this tutorial!

Done!

reference:http://www.youngcoders.com/

Create a Live Windows CD

Take a look at http://www.lachiesadicristo.it/w98cd/default.htm.

It guides you how to create a live, bootable CD with Windows on. Once the CD is created, you can use it on any PC (with enough RAM) to run Windows, without even touching the hard drive.

It's easy to do if you know Windows well. I have once of these CD's I made with tools to fix up my PC if it was to ever develop a problem. Very useful indeed.

It's recommended you use Windows 98, but if you have a powerful PC with more than 512MB RAM, you could use Windows Me easily.

Just take note that some of the tools listed in the tutorial have now disappeared from the net, making them hard to find. I will post links to the missing tools when I track them down or upload them to my site.