HTTP POST from PHP

Sometimes it can be useful to do a HTTP GET or HTTP POST request from a PHP script. I used to use curl to do this but there’s a ‘cleaner’ way to do this.

For reference, this is how to do the HTTP POST request in curl from PHP

The PEAR – PHP Extension and Application Repository contains a number of useful reusable PHP components.

The component we are going to use is HTTP_Request2. YouRead more.

NMAP Open Service Scan – Open resolver test

From the CERT.be website : Open DNS resolvers are frequently being abused to conduct efficient DDoS attacks towards websites, infrastructure and services..

You can detect open resolvers on your network with a vulnerability information management tool (for example Qualys), via the Open Resolver Project or manually with an nmap command.

Keeping track of the different output files becomes more difficult if you have to do this often. I wrote a script that imports the nmapRead more.

STeBB – Web pen testing

STeBB ( Security Testing Browser Bundle ) is an all in one web security toolkit for web application security testers. Built over Mozilla Firefox, this Linux based open source browser bundle comes with a vast array of awesome tools that help you secure your web application. STeBB runs in Debian based Linux distributions and can be used to thoroughly security test the web applications, especially the OWASP Top 10 risks. Basically it’s a web penRead more.

tiny Web Url Scanner

For a new project I needed a tool that could scan a web server for the http status code of different URLs and have the results listed in a easily parseable result. The URLs are typical Linux resources (f.e. the password file, the hostname, services file, …) that could lead to disclosing sensitive system information.

There are already a number of tools that can achieve this but none really provided the output that I needed.Read more.

Catch all web script

It can sometimes be useful to have a script that captures all the HTTP requests and that logs these requests to a file. The PHP script below works for me. I use this script in combination with the htaccess file to catch all web page requests and redirect them to one file.

The .htaccess file :

The apache config for the virtual host is straightforward.

What is inside the Adobe hacked database file?

Adobe recently suffered from a break-in where intruders were able to get hold of Adobe users’data, containing email addresses, encrypted passwords, password hint names, etc.

This break-in was acknowledged by Adobe (note that the acknowledgement page from Adobe does not have a date or timestamp, at least not on Nov-17, it only mentions ‘recently’).

The posting on the Sophos blog by Paul Ducklin provides a very interesting overview on the cryptographic blunders made by Adobe.Read more.

Harvesting Facebook, Twitter and other web service accounts

This post demonstrates how relatively easy it is to setup a system that harvests user credentials (username and password) for different web services (Facebook, Twitter, Yahoo).

For this exercise we’ll use two machines :

An end-user laptop or desktop with a browser; Kali Linux with a number of pentesting tools. The Kali Linux machine needs at least one network interface with internet connection.

The exercise scenario involves three major steps :

HaveRead more.

Theming WordPress excerpts and archives

I run this blog on WordPress. One of the major advantages of WordPress is its support for customizable web themes. These themes contain the graphical markup (CSS, images) and PHP code to mangle the data that is displayed.

I’ve adapted some of the default functions to have the display of archives and blog excerpts behave differently to the default provided by WordPress.

WordPress archives are accessible via the wp_get_archives function. This function has a numberRead more.

Password attacks against http web forms

Web applications have become important assets in a company infrastructure. If you need to do a penetration test then it is essential that you have a basic understanding of how to analyse and test these web applications.

Many, if not all, require some form of authentication. Sometimes this happens via Basic Authentication where the user needs to enter credentials in some form of popup in the web browser. More often though the authentication happens viaRead more.

Top 20 Free Digital Forensic Investigation Tools for SysAdmins

A list of 20 different digital forensic investigation tools. The list is taken from http://www.gfi.com/blog/top-20-free-digital-forensic-investigation-tools-for-sysadmins/.

Added this post as a reminder-to-self.

SANS SIFT ProDiscover Basic Volatility The Sleuth Kit (+Autopsy) FTK Imager Linux ‘dd’ CAINE Oxygen Forensic Suite 2013 Standard Free Hex Editor Neo Bulk Extractor DEFT Xplico LastActivityView Digital Forensic Framework Mandiant RedLine PlainSight HxD HELIX3 Free NetSleuth P2 eXplorer Free