Display Date And Time For Each Bash Command

To display shell command history with date and time under a UNIX or Linux operating systems, set up the HISTTIMEFORMAT. This will set the timestamp information associated with each bash entry in history that is written to the history file.

echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bash_profile

To see history type
Sample output:
683 20140903 - 07:50:57 - history |grep yum
684 20140904 - 09:42:36 - yum update
685 20140904 - 09:44:16 - uname -a
686 20140904 - 09:44:30 - reboot -e
687 20140904 - 09:45:09 - shutdown -r now
688 20140904 - 09:45:12 - exit

Useful tools for CTF

From http://delimitry.blogspot.in/2014/10/useful-tools-for-ctf.html

I’ve selected useful and must-have tools for CTF games and computer security competitions. Most of this tools are often indispensable during the games (especially task-based/jeopardy CTF games).
I’ve combined tools by categories just like in CTF games: Reverse, Steganography, Networking, Forensics, Cryptography, Scripting.
Most of tools are cross-platform, but some of them are only for Windows or Linux.
Here the light and dark editions of cheat sheets/posters with tools:

This is the first version of useful CTF tools cheat sheets. I’m planning to update them with new useful tools.
Thanks to shr for a good advice to add the links for tools. Here are the links to the tools from cheat sheets:

Reverse Engineering:
GDB – http://www.gnu.org/software/gdb/download/
IDA Pro – https://www.hex-rays.com/products/ida/support/download.shtml
Immunity Debugger – http://debugger.immunityinc.com/
OllyDbg – http://www.ollydbg.de/
radare2 – http://www.radare.org/y/?p=download
Hopper – http://www.hopperapp.com/download.html
nm – unix/linux tool
objdump – linux tool
strace – linux tool
ILSpy – http://ilspy.net/
JD-GUI – http://jd.benow.ca/#jd-gui-overview
FFDec – http://www.free-decompiler.com/flash/download.html
dex2jar – http://code.google.com/p/dex2jar/
uncompyle2 – https://github.com/wibiti/uncompyle2
Hex editors:
HxD – http://mh-nexus.de/en/hxd/
Neo – http://www.new-hex-editor.com/hex-editor-downloads.html
Bless – http://home.gna.org/bless/downloads.html
wxHexEditor – http://www.wxhexeditor.org/download.php
Exe unpackers – Unpacking Kit 2012 – http://forum.exetools.com/showthread.php?t=13610

Wireshark, tshark – https://www.wireshark.org/download.html
OpenVPN – https://openvpn.net/
OpenSSL – https://www.openssl.org/related/binaries.html
tcpdump – http://www.tcpdump.org/
netcat – http://netcat.sourceforge.net/
nmap – http://nmap.org/download.html

OpenStego – http://www.openstego.info/
OutGuess – http://www.outguess.org/download.php
Steghide – http://steghide.sourceforge.net/download.php
StegFS – http://sourceforge.net/projects/stegfs/
pngcheck – http://www.libpng.org/pub/png/apps/pngcheck.html
GIMP – http://www.gimp.org/downloads/
Audacity – http://audacity.sourceforge.net/download/
MP3Stego – http://www.petitcolas.net/steganography/mp3stego/
ffmpeg (for video analysis) – https://www.ffmpeg.org/download.html

dd – unix/linux tool
strings – unix/linux tool
scalpel – https://github.com/sleuthkit/scalpel
TrID – http://mark0.net/soft-trid-e.html
binwalk – http://binwalk.org/
foremost – http://foremost.sourceforge.net/
ExifTool – http://www.sno.phy.queensu.ca/~phil/exiftool/
Digital Forensics Framework (DFF) – http://www.digital-forensic.org/download/
Computer Aided INvestigative Environment (CAINE) Linux forensics live distribution – http://www.caine-live.net/
The Sleuth Kit (TSK) – http://www.sleuthkit.org/sleuthkit/download.php
Volatility – http://code.google.com/p/volatility/

Scripting / PPC (Professional Programming and Coding):
Text editors:
Sublime Text – http://www.sublimetext.com/
Notepad++ – http://notepad-plus-plus.org/
vim – http://www.vim.org/
emacs – http://www.gnu.org/software/emacs/

Cryptool – https://www.cryptool.org/
hashpump – https://github.com/bwall/HashPump
Sage – http://www.sagemath.org/
John the Ripper – http://www.openwall.com/john/
xortool – https://github.com/hellman/xortool
Online tools:
Modules for python – pycrypto – https://www.dlitz.net/software/pycrypto/

From http://delimitry.blogspot.in/2014/10/useful-tools-for-ctf.html

Downgrading PHP


Many people seem to have a lot of questions about downgrading php, and evidently many do not know about the roll-back option in easyapache.

***Important: This feature is marked BETA by cpanel, and may have unexpected results.***

It is also important to note that this will roll back both the apache install and *DSO php* installed. It will not roll back the command line php version, or the suphp/fcgi php options as those use the command line binaries. If the previous install used DSO and a recent build switched it to FCGI/SUPHP however, this will work. To roll back for suphp/fcgi you will have to do a normal recompile.

The /scripts/easyapache tool has a feature that allows you to roll back to a previous build.

You can invoke this option like so:

/scripts/easyapache --restore-archive --force

You will see the most recent build, as well as various builds by archive date. This is the date they were *replaced* rather than built.

| Previous backup
| <> Build archived '2010-03-02 22:12:09Z'
| <> Build archived '2010-03-03 01:21:59Z'
| <> Build archived '2010-11-04 22:38:06Z'

These builds are archived in the following locations:


^^^this is the “Previous Backup^^^


^^^this directory contains the rest, in directories named according to the time archived.^^^

If you are hunting through these for a specific version of DSO php, you can run this:

find /usr/local/apache.backup_archive/ /usr/local/apache.backup/ -name 'libphp?.so' | xargs strings -f | grep 'X-Powered-By'

That output should look like this if any of the previous builds have DSO php:

/usr/local/apache.backup_archive/20120802.1343866469/modules/libphp5.so: X-Powered-By: PHP/5.2.17
/usr/local/apache.backup_archive/20100303.1267579319/modules/libphp5.so: X-Powered-By: PHP/5.2.12
/usr/local/apache.backup/modules/libphp5.so: X-Powered-By: PHP/5.2.17

That should let you determine which build to restore.

Note: “php -v” will show the cli verison. If you want to know the version of the current DSO to confirm that the restore worked, run this:
strings -f /usr/local/apache/*/libphp5.so | grep 'X-Powered-By'