search PRIV & ALL sites linked here

Sunday, November 6, 2011

Memgrep 0.8.1b Release! (skape's code updated)

Here is the updated tarball!
http://priv.efnet.pe/~builder/memgrep-0.8.1b.tar.gz

Skape describes his program as this:
A dynamic memory analysis utility for Linux and FreeBSD. 
on the original site http://hick.org/code/skape/memgrep/ 
which also has all the documentation and older packages.

 * UPDATED by builder #priv@efnet. where you at skape?
 * couple of minor adjustments to make this compile on newer linux. was changed to and we added
 * an #include to
in the #else linux section. next we just commented out the extern declaration at what is now
 * line 101. Added a NULL check on fgets() at line 652 to eliminate a warning. Also simple.c needs #include
to stop
 * another minor warning. anyway, I really love this code and i hope skape will make it compatible with amd64 arch soon!

 

I take no credit for developing this code, but I really love it and skape hasn't updated it in forever so I made some minor changes to make it compile neatly on newer 32 bit linux systems. I have only tried on Ubuntu and Gentoo so if anything, this post will hopefully get some feedback and we can work together to make this tool popular again. My ultimate dream is to have this work on 64 bit architectures.

here is the usage, enjoi!

memgrep -- Run-time/core-time memory searching, dumping and modifying utility.
Usage: ./memgrep [-p pid] [-o core] [-T] [-d] [-r] [-s] [-e] [-a addr1,addr2,bss,addr3] [-l length]
                 [-f fmt,search data] [-t fmt,replace data] [-b pad] [-m minimum size]
                 [-F fmt] [-L] [-v] [-h]

   -p [pid]   The process id to operate on.
   -o [core]  The core file to operate on.
   -T         Build a referential tree for the given address(es).
   -d         Dump memory from the specified address(es) for the given length (-l).
   -r         Replace memory at the specified address(es).  If -s is also specified.
              only memory that matches the search criteria will be replaced.
   -s         Search memory at the specified address(es).
   -e         Enumerate the heap.
   -a [addr]  The address(es) to operate on seperated by commas.  Addresses can be
              in the following format:
                 0x821c4ac
                 821c4ac
              Also, the following keywords can be used:
                 bss       -> Uses the VMA associated with the .bss section (uninit global vars, heap data).
                 rodata    -> Uses the VMA associated with the .rodata section (read-only data, ie, static text).
                 data      -> Uses the VMA associated with the .data section (data, ie, global variables).
                 text      -> Uses the VMA associated with the .text section (text, ie, executable code).
                 stack     -> Dynamically determines the current stack pointer.
                 all       -> Uses bss, stack, rodata, data, text.  This is the only keyword that can be used
                              when operating on core files.
   -l [len]   The length to use when searching or dumping.  A length of 0 means search
              till end-of-memory.
   -f [data]  This specifies the search criteria.  Multiple formats are accepted for ease
              of use.  Below are accepted formats and their examples:
                 s -> String format  (Ex: 's,Testing')
                 x -> Hex format     (Ex: 'x,00414100AB')
                 i -> Integer format (Ex: 'i,4724')
   -t [data]  This specifies the replace data.  The same formats used with the -f parameter
              are valid for the -t parameter.
   -m [minsz] The minimum size of a heap allocation for use when enumerating.
   -b [pad]   Number of bytes of padding to use around dump addresses (default is 0).
   -F [fmt]   The format to use when dumping memory, can be one of the following:
                 hexint    -> Four byte hexi-decimal integers.
                 hexshort  -> Two byte hexi-decimal shorts.
                 hexbyte   -> One byte hexi-decimal characters.
                 decint    -> Four byte decimal integers.
                 decshort  -> Two byte decimal shorts.
                 decbyte   -> One byte decimal characters.
                 printable -> Printable characters.
   -L         List memory segments of a process or core file.
   -v         Version information.
   -h         Help.



   Example search (search for 'Jane' in .bss):

      ./memgrep -p 1335 -s -a bss -f s,Jane

   Example replace (replace memory at 0x8423143 and 0x8443147 with 0x00ff0041):

      ./memgrep -p 1335 -r -a 0x8423143,0x8443147 -t x,00ff0041

   Example search/replace (Replace 'Test' with 'Rest' in .bss and .rodata):

      ./memgrep -p 1335 -s -r -a bss,rodata -f s,Test -t s,Rest

   Example dump (Dump memory starting at 0x8422113 for 16 bytes):

      ./memgrep -p 1335 -d -a 0x8422113 -l 16




Monday, September 5, 2011

HowTo Install Arduino on BackTrack 5

I didn't want to make a second post for today, but i have a real treat for you!
http://jon.oberheide.org/files/half-nelson.c
the always cutting edge Jon Oberheide released his stack based overflow for econet_sendmsg function. affecting kernels < 2.6.36.2.
also a LKM rickroller: https://github.com/fpletz/kernelroll


+++

This is made to be a quick tutorial for x86 architecture and you should have root permissions. If this does not work please refer to http://www.arduino.cc/playground/Linux/Ubuntu for more detailed instructions for Arduino on Ubuntu(which is what BackTrack is based on).

First thing you should do is plug in your Arduino board to the BackTrack5 machine(assuming via USB) and type:

#modprobe ftdi_sio
#dmesg

in a console. You should see something like this in the dmesg output.
  
[91296.051432] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB0

If not it is likely you need to recompile your kernel to include this support. Most likely it is installed as a module so the modprobe command would have enabled it. Next we will go ahead and grab the debian packages needed:


#mkdir /tmp/arduino
#cd /tmp/arduino
#wget http://mirror.pnl.gov/ubuntu//pool/universe/r/rxtx/librxtx-java_2.2pre2-3~maverick1_i386.deb
#wget http://mirror.pnl.gov/ubuntu//pool/universe/a/arduino/arduino-core_0022+dfsg-1~maverick1_all.deb
#wget http://mirror.pnl.gov/ubuntu//pool/universe/a/arduino/arduino_0022+dfsg-1~maverick1_all.deb

Now we are ready to install everything to the system! First use apt to install avrdude, which is the microcontroller programmer. Then just use dpkg -i to install the .deb's


#apt-get install avrdude
#apt-get install gcc-avr
#apt-get binutils-avr
#apt-get install avr-libc
#dpkg -i *.deb


If it complains about dependency problems, then just run:

#apt-get -f install

And dpkg one more time

#dpkg -i *.dep

If you didn't get any errors you should be able to run "arduino" in a terminal, which will bring up the IDE. I suggest opening up the example blink program and changing the delay() values to something fast(200 will work) and uploading it to the board. Pin 13 gives warning blinks so this will verify everything is working. Remember to press the reset button while uploading and change the settings in the sketch program to match what board you have. If anyone does any network or hacking related arduino projects I would love to hear from you. Check us out on efnet IRC@ #priv.  
  


 

Sunday, September 4, 2011

PMCMA Released & DigiNotar Damage Disclosed

Pcmca is software that will attempt to automatically write an exploit for memory corruption bugs in software. Can greatly save time in reverse engineering.

The code is available at:
https://github.com/toucan-system/pmcma

while the main site is simply http://www.pmcma.org

It was presented at the blackhat conference in Vegas this year. Here are the slides and whitepaper!
http://www.pmcma.org/wp-content/uploads/2011/09/bhus_2011_brossard.pdf
http://www.pmcma.org/wp-content/uploads/2011/09/BHUS-2011_Brossard.pdf

+++

Okay, I am sure everyone has heard of the recent DigiNotar "Debacle" but if not here is a good link to tell you what is up.
https://blog.torproject.org/blog/diginotar-debacle-and-what-you-should-do-about-it

This next link is the raw spreadsheet data of the compromised certs!
https://svn.torproject.org/svn/projects/misc/diginotar/rogue-certs-2011-09-04.csv

and here is the tor projects latest blog post:

This is the list of CA roots that should probably never be trusted again:
DigiNotar Cyber CA
DigiNotar Extended Validation CA
DigiNotar Public CA 2025
DigiNotar Public CA - G2
Koninklijke Notariele Beroepsorganisatie CA
Stichting TTP Infos CA
The most egregious certs issued were for *.*.com and *.*.org while certificates for Windows Update and certificates for other hosts are of limited harm by comparison. The attackers also issued certificates in the names of other certificate authorities such as "VeriSign Root CA" and "Thawte Root CA" as we witnessed with ComodoGate, although we cannot determine whether they succeeded in creating any intermediate CA certs. That's really saying something about the amount of damage a single compromised CA might inflict with poor security practices and regular internet luck.
Of particular note is this certificate:
CN=*.RamzShekaneBozorg.com,SN=PK000229200006593,OU=Sare Toro Ham Mishkanam,L=Tehran,O=Hameye Ramzaro Mishkanam,C=IR
The text here appears to be be an entry like any other but it is infact a calling card from a Farsi speaker. RamzShekaneBozorg.com is not a valid domain as of this writing.
Thanks to an anonymous Farsi speaker, I now understand that the above certificate is actually a comment to anyone who bothers to read between the lines:
"RamzShekaneBozorg" is "great cracker"
"Hameyeh Ramzaro Mishkanam" translates to "I will crack all encryption"
"Sare Toro Ham Mishkanam" translates to "i hate/break your head"

Wednesday, August 31, 2011

Kernel.org Box Hacked and Using Googles Bandwidth to DDOS

first off, here is some pretty clever usage of the newly popular G+
---
The vulnerable pages are /_/sharebox/linkpreview/ and gadgets/proxy?
Is possible to request any file type, and G+ will download and show all the content. So, if you parallelize so many requests, is possible to DDoS any site with Google bandwidth. Is also possible to start the attack without be logged in G+.

http://www.ihteam.net/advisory/make-requests-through-google-servers-ddos/

small shell script to do the dirty work:
http://www.ihteam.net/advisories/_154785695367_+ddos.sh
 
before we get to the kernel.org hack, here is a couple of other recent articles of interest.

MAC address spoofing attacks against port security:
http://www.usenix.org/events/woot11/tech/final_files/Buhr.pdf

Understanding the LFH:
http://www.illmatics.com/Understanding_the_LFH.pdf

Remotely Exploiting the PHY layer. Inject RAW frames into wireless networks.
http://travisgoodspeed.blogspot.com/2011/09/remotely-exploiting-phy-layer.html

IE JavaScript Heap Spray stage 1 exploit explained
http://picturoku.blogspot.com/2011/09/diaries-of-vulnerability-take-2.html

http://threatpost.com/en_us/blogs/hackers-pushing-voip-audit-tools-malicious-attacks-083111

http://www.symantec.com/connect/blogs/morto-worm-sets-dns-record

http://www.itproportal.com/2011/08/09/android-based-hacking-toolkit-anti-unveiled-defcon/

and although Apache just released a patch today(which OS X will not have available yet) here is a PHP IP range scanner for the DoS.
http://apache-range-exploit.com/

i have to admit, i lol'ed at this. here is the pastebin!

---------- Forwarded message ----------
From: J.H.
Date: 2011/8/29
Subject: [kernel.org users] [KORG] Master back-end break-in
To: users@kernel.org


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Afternoon Everyone,

As you can guess from the subject line, I've not had what many would
consider a "good" day.  Earlier today discovered a trojan existing on
HPA's personal colo machine, as well as hera.  Upon some investigation
there are a couple of kernel.org boxes, specifically hera and odin1,
with potential pre-cursors on demeter2, zeus1 and zeus2, that have been
hit by this.

As it stands right now, HPA is working on cleaning his box, and
I'm working on hera (odin1 and zeus1 are out of rotation still for other
reasons), mainly so that if one of us finds something of interest, we
can deal with it and compare notes on the other box.

Points of interest:

- - Break-in seems to have initially occurred no later than August 12th

- - Files belonging to ssh (openssh, openssh-server and openssh-clients)
were modified and running live.  These have been uninstalled and
removed, all processes were killed and known good copies were
reinstalled.  That said all users may wish to consider taking this
opportunity to change their passwords and update ssh keys (particularly
if you had an ssh private key on hera).  This seems to have occurred on
or around August 19th.

- - A trojan startup file was added to rc3.d

- - User interactions were logged, as well as some exploit code.  We have
retained this for now.

- - Trojan initially discovered due to the Xnest /dev/mem error message
w/o Xnest installed; have been seen on other systems.  It is unclear if
systems that exhibit this message are susceptible, compromised or not.
If you see this, and you don't have Xnest installed, please investigate.

- - It *appears* that 3.1-rc2 might have blocked the exploit injector, we
don't know if this is intentional or a side affect of another bugfix or
change.

- - System is being verified from backups, signatures, etc.  As of right
now things look correct, however we may take the system down soon to do
a full reinstall and for more invasive checking.

- - As a precaution a number of packages have been removed from the
system, if something was removed that you were using please let us know
so we can put it back.

- - At this time we do not know the vector that was used to get into the
systems, but the attackers had gained root access level privileges.

That's what we know right now, some of the recent instabilities may have
been caused by these intrusions, and we are looking into everything.

If you are on the box, keep an eye out, and if you see something please
let us know immediately.

Beyond that, verify your git trees and make sure things are correct.

- - John 'Warthog9' Hawley
Chief Kernel.org Administrator
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk5a5U0ACgkQ/E3kyWU9dif+1ACfYPlgq/keFrFO77AmQVduKGwx
TAcAnRAu6nHt74+5aC+fPeb8aT0hcy2K
=Semd
-----END PGP SIGNATURE-----



Wednesday, June 29, 2011

operation infitada

hmm

Wednesday, June 8, 2011

happily married!


posts to this blog have been temporarily discontinued to due to my recent marriage. thanks for all the support!










NOT






page of links is forever, dont mind my ancient posts...