The highest form of ignorance is when you reject something you don't know anything about.

Wayne Dyer (b 1940)

How To Install Pyrit CUDA on Mac

Pyrit CUDA:  Release the Kraken!

How To Install Pyrit CUDA on a Mac







We hope that you have not landed here randomly, Pyrit CUDA is not for the faint of heart, But your patience will be rewarded.  Highly rewarded.

CUDA stands for Compute Unified Device Architecture. It uses or unleash the power of your GPU(s) to compute a bit faster things like .... WPA key Recovery.
Pyrit CUDA is not a magic bullet, it's just a much, much bigger caliber.

Why Pyrit CUDA?
On my "Old MBP", Pyrit CUDA is 45% faster than Aircrack-ng without a sweat,  If you have a "New Mac" with a much faster Graphic Card, you can expect 50-200% faster. 
45% means than instead of running for 10hrs, you'll do the job in 5.5hrs,  Some monsters claim 89,000 PMKs/S.  With a little tweak, you can go 300% faster, see example under "tips"

I went to Pyrit after finagling wayyyyy to much with Aircrack-CUDA.  Using Backtrack5 on VMware, Aircrack-CUDA was the straw that broke the camel back: The time needed for the install and fixing the issues was longer than trying Aircrack the regular way.  So, here is Pyrit, native on a Mac.
Pyrit also allows you to create database of pre-computed PMK, also known as Rainbow Tables, and here, it starts to go really fast ... 


How To Install Pyrit CUDA on a Mac, OSX 10.6.8
For OSX 10.7 Lion, almost the same, but read the help first

1)    Click  > About this Mac > More Info > Graphics/Display to check your Card model #
1a)  Verify that you have a CUDA supported graphic card, if not , we're sorry to see you go...
2)     Follow the steps exactly in the order they are mentioned.
3)     You need to have Admin Rights or the Admin Password
4)     You should be Terminal Savvy. If not read the tips at the end first 
5)     You need to type the commands verbatim.  A space too much and you're out ....
6)     You can click on the pictures to enlarge them. It could help....
7)     There is a list of warnings at the end, read them!
8)     Verify that you have verified the verifications


The full install takes about 30~45 min.

Ready?

Download,  in a easily accessible folder the following , do NOT install yet

Nvidia CUDA drivers for Mac:
http://www.nvidia.com/object/mac-driver-archive.html

CUDA SDK    (requires OSX ver. 10.6.7 or higher)
http://developer.nvidia.com/cuda-toolkit-40
Select  "CUDA Toolkit" under Mac OS
For Older Version (10.6.6 and under)

NOTE: 
If you have an "old" Nvidia card, try the "older version" first, you'll save a lot a space. 
the "old version" is half the size of the new one, and you can always upgrade later 


Libnet
http://libdnet.googlecode.com/files/libdnet-1.12.tgz
pylibpcap
http://dfn.dl.sourceforge.net/sourceforge/pylibpcap/pylibpcap-0.6.2.tar.gz  
Scapy
http://www.secdev.org/projects/scapy/files/scapy-latest.tar.gz

You should now,  have something looking like that:







Install  Nvidia Driver for Mac
Click on the DMG, etc ..

This install is going to take few minutes..
While installing....
Take few seconds to click the Like button on our FB page
Thanks


Install  Nvidia CUDA TOOLKIT for Mac
Click on the DMG, etc 













Open Terminal and start the installation of libnet
"Path to"  refers to the path to the file. i.e /Users/MyName/Downloads/
Example:


tar -xzf  /Users/MyName/Downloads/libdnet-1.12.tgz

Install

tar -xzf  “Path to” libdnet-1.12.tgz
cd libdnet-1.12
./configure
make
sudo make install
cd python
sudo python setup.py install
Install  Nvidia Driver for Mac, C

Now we install Pylibpcap 

tar -xzf “Path to” pylibpcap-0.6.2.tar.gz
cd pylibpcap-0.6.2
sudo python setup.py install

Scapy Install

tar -xzf "Path to" scapy .tar.gz
cd scapy
sudo python setup.py install
 

Now the prerequisites are done, we can go in the hearth of the subject.
From the Terminal Window, Download Pyrit

svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit-read-only

Build and install Pyrit

cd pyrit-read-only
cd pyrit
sudo python setup.py install


Last step, Pyrit CUDA

cd pyrit-read-only
cd cpyrit_cuda
sudo LDFLAGS=-L/usr/local/cuda/lib python setup.py install
 

Now we need to check if all of that was worth it
Check if Pyrit CUDA is working 

pyrit list_cores



You should see a list of your cores and a list of your GPU(s)
Something like









Once done, let's Benchmark it and see if we can Release The Kraken

pyrit benchmark












*I have installed Pyrit on an old machine, the "good ones" are "reserved" for work. :-)
  Leave a comment either here or on FB with your Config and the Benchmark Results. 
 Who has a monster?



GTK, FAQ, RFAQ, TIPS, Help

GTK!  AKA "Good To Know"

Bruteforcing is time consuming, so you need to go as fast as possible, and also AS SMART AS POSSIBLE:   Bruteforcing in blind mode, aka starting @ "00000000" and going all the way up, trying each alphanumerical combination is just a pure waste of your (limited) time, you silly mortal, and your electricity bill will go up a bit.  Go smart, use a statistically sorted Attack Dictionary: Most used password first:  If the password to discover is "password" running an incremental attack will take you few months: The first set of numbers is 100,000,000 long, then for each set of letters, add 110,075,314,176. You have 24 sets, hence 2,641,807,540,224 passwords.  Then repeat with upper cap... then mingle all of that ... a0a0a0a0
Your brain has now stopped perceiving the true value of those numbers.  Mine too.
But that's not it! 
Mr. WPA is a tedious little man:  Each password has 4096 round of hash, salted with the BSSID.  It means in clear that your CPU/GPU will crunch about 1 Megabytes (byte, not bit) of data for each PMK (Pairwise Master Key)  , Each Password is "about" 4 PMK
2500 PMK/second and you'll have 2.44 Gigabytes of data being pushed trough per second...
The first set of numbers, 8ch long, will boils down to about a billion megabytes of data being crunched. 
So, Act like a ninja, and think like Einstein: Go smart!

Tips

If you are here, you should know it:  Don't play too much with the sudo command: it's an unforgiving command.  sudo does not give any warning,  sudo is "Das Terminator
Long paths
Avoid typing long path with spaces or weird names:
1) Download in a easily accessible folder
2) Type your command, i.e "tar -xzf" then drag the file from Finder to Terminal; the path will automagically appears correctly.
3) Use the arrow up to call back a previous command
4) copy and paste the command instead of re-typing them:
"cd cpyrit" just looks like "cd pyrit"  ( "C"pyrit )
(The first one that will comment about cd not working will get seriously flamed)

CUDA use 
When using Pyrit CUDA, quit all applications, including Anti-virus, Browser etc, I mean everything: Dropbox, Airport, etc. Anything that use a single %. Kill all processes but the vital ones: The performances will improve significantly.
For the best results, don't even use a screen saver:  quit everything and let the screen go black. Remember? CUDA is using your GPUs.  Following those tips you'll see the performance increasing  significantly:




We are now 279% (Two-hundred-seventy-nine ) faster than Aircrack-ng 1.1 and  600% faster than KisMAC 0.3.3 .  Yes, 600%.  But, that's not it!  Can you go faster than that?

Temperature:
If you crunch for hours, don't forget that  Pyrit CUDA will try to use 100% of your CPUs and 100% of your GPUs: The Temperature is going to go up a bit. If you have a laptop, I'll suggest to elevate it on the four corners and leave at least 1/2 inch of free space under. 

FAQ, RFAQ, SFQRFA

- My card is not supported!
  Bummer! 
- How do you crack a WEP on Pyrit?
  You don't!  Pyrit is WPA only.
- kan't crack the pazwords!
  Probable Cause
- it doz not workz!
  Probable Cause
- It's not working on Windows
  Did you pass the test? (successfully?)
- I want to crack my girlfriend password
  Talk to those guys
- I overclocked my GPU and my computer shut down
  Told ya!  Try not to go over 200F / 93C.  If you insist, you may be able to fry an egg on your Mac, please send us the picture.  For a "runny-sunny side up" you can start at 66C.
- Please help
  It's just below. on more line...  

Pyrit help
For more help type "pyrit -h [command]"  i.e  "pyrit -h attack_ passtrough"

Highly recommended reading: 
http://pyrit.wordpress.com/
About Pyrit
http://pyrit.wordpress.com/about/

Pyrit on OSX Lion 10.7 
"Many people have problems compiling Pyrit on OSX Lion. The version of GCC distributed with the latest XCode no longer supports creating binary code for the PPC-architecture and Python’s setup.py does not know about that; you can get an error message like the following:"

assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed

You can solve this situation by forcing GCC to only compile code for the i386- and the x86_64-architecture. To do this, put the following into your .bash_profile:

export ARCHFLAGS=”-arch i386 –arch x86_64”

Source: http://pyrit.wordpress.com/
Retrieved Aug 2, 2011


Pyrit 0.4.1-dev (svn r308) (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Usage: pyrit [options] command

Recognized options:
  -b               : Filters AccessPoint by BSSID
  -e               : Filters AccessPoint by ESSID
  -h               : Print help for a certain command
  -i               : Filename for input ('-' is stdin)
  -o               : Filename for output ('-' is stdout)
  -r               : Packet capture source in pcap-format
  -u               : URL of the storage-system to use
  --all-handshakes : Use all handshakes instead of the best one

Recognized commands:
  analyze                 : Analyze a packet-capture file
  attack_batch            : Attack a handshake with PMKs/passwords from the db
  attack_cowpatty         : Attack a handshake with PMKs from a cowpatty-file
  attack_db               : Attack a handshake with PMKs from the db
  attack_passthrough      : Attack a handshake with passwords from a file
  batch                   : Batchprocess the database
  benchmark               : Determine performance of available cores
  benchmark_long          : Longer and more accurate version of benchmark (~10 minutes)
  check_db                : Check the database for errors
  create_essid            : Create a new ESSID
  delete_essid            : Delete a ESSID from the database
  eval                    : Count the available passwords and matching results
  export_cowpatty         : Export results to a new cowpatty file
  export_hashdb           : Export results to an airolib database
  export_passwords        : Export passwords to a file
  help                    : Print general help
  import_passwords        : Import passwords from a file-like source
  import_unique_passwords : Import unique passwords from a file-like source
  list_cores              : List available cores
  list_essids             : List all ESSIDs but don't count matching results
  passthrough             : Compute PMKs and write results to a file
  relay                   : Relay a storage-url via RPC
  selftest                : Test hardware to ensure it computes correct results
  serve                   : Serve local hardware to other Pyrit clients
  strip                   : Strip packet-capture files to the relevant packets
  stripLive               : Capture relevant packets from a live capture-source
  verify                  : Verify 10% of the results by recomputation

More help
http://code.google.com/p/pyrit/

Basic Command lines
 
pyrit  -h attack_passthrough
The -h option gives a more detailed help on an option, here help on "Attack_Passthrough" -h should be used profusely.


pyrit benchmark
Does a Quick Benchmark


pyrit benchmark_long
Does a long Benchmark


pyrit -r test.pcap -b 00:de:ad:be:ef:00 -i words attack_passthrough
Regular attack on a specific ESSID via Dictionary


pyrit -r test.pcap -b 00:de:ad:c0:de:00 -o passwd.txt attack_batch
  "Pairwise Master Keys that have been computed and stored in the
database previously are taken from there; all other passwords are
translated into their respective Pairwise Master Keys and added to
the database for later re-use. ESSIDs are created automatically in
the database if necessary." 
Note:  .PCAP, .CAP or Dumplogs are the same

Overclocking
You can overclock, but: 
As much as you will be tempted, let me remind you that if you have a laptop, things may get hot.  Really hot!  Even SMCFan Control may not be enough.
Frying your GPU will not be a good thing.  Overclock at your own risk(s)

little hidden gem:
because you've read so far, you deserve a little bonus:
Bookmark us, follow that blog, and we'll provide you with a very good surprise.

Comments:
Please read this before commenting


.


.

33 comments:

  1. You might want to tell people to use gfxCardStatus on MBPro's as the CUDA support dies as soon as the laptop switches back to the intel video card.

    Here is the difference on my system (MacBookPro6,2 Intel Core i7) WITH Safari and other apps running in the background.

    sh-3.2# sudo pyrit benchmark
    Pyrit 0.4.1-dev (svn r308) (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
    This code is distributed under the GNU General Public License v3+

    Running benchmark (1420.3 PMKs/s)... |

    Computed 1420.29 PMKs/s total.
    #1: 'CPU-Core (SSE2)': 378.7 PMKs/s (RTT 3.0)
    #2: 'CPU-Core (SSE2)': 381.5 PMKs/s (RTT 3.1)
    #3: 'CPU-Core (SSE2)': 382.1 PMKs/s (RTT 3.1)
    #4: 'CPU-Core (SSE2)': 377.6 PMKs/s (RTT 3.0)
    sh-3.2# sudo pyrit list_cores
    Pyrit 0.4.1-dev (svn r308) (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
    This code is distributed under the GNU General Public License v3+

    The following cores seem available...
    #1: 'CUDA-Device #1 'GeForce GT 330M''
    #2: 'CPU-Core (SSE2)'
    #3: 'CPU-Core (SSE2)'
    #4: 'CPU-Core (SSE2)'
    sh-3.2# sudo pyrit benchmark
    Pyrit 0.4.1-dev (svn r308) (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
    This code is distributed under the GNU General Public License v3+

    Running benchmark (2897.8 PMKs/s)... -

    Computed 2897.80 PMKs/s total.
    #1: 'CUDA-Device #1 'GeForce GT 330M'': 2005.3 PMKs/s (RTT 2.9)
    #2: 'CPU-Core (SSE2)': 383.5 PMKs/s (RTT 3.1)
    #3: 'CPU-Core (SSE2)': 382.4 PMKs/s (RTT 3.1)
    #4: 'CPU-Core (SSE2)': 381.4 PMKs/s (RTT 3.0)

    ReplyDelete
  2. Anonymous,
    Thanks for the benchmark.
    Without the apps running on the background, each core should provide ~800 PMKs/s

    ReplyDelete
  3. Great subject, but why not simply indicate that users can install all of this simply by using macports...

    # sudo port install py26-scapy

    Later,

    ReplyDelete
  4. Seems to encountering a problem when installing libdnet: I wont post the whole terminal output but this is a section.

    First part of screen print:

    i7:python MBP$ sudo python setup.py install
    running install
    running build
    running build_ext
    building 'dnet' extension
    gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -I../include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c ./dnet.c -o build/temp.macosx-10.6-universal-2.6/./dnet.o
    ./dnet.c:62: warning: this decimal constant is unsigned only in ISO C90
    ./dnet.c: In function ‘__pyx_f_4dnet___oserror’:
    ./dnet.c:447: warning: function declaration isn’t a prototype
    ./dnet.c: In function ‘__pyx_f_4dnet_3eth_get’:
    ./dnet.c:581: warning: pointer targets in passing argument 1 of ‘PyString_FromStringAndSize’ differ in signedness
    ./dnet.c: In function ‘__pyx_f_4dnet_3eth_set’:
    ./dnet.c:613: warning: pointer targets in passing argument 1 of ‘__pyx_f_4dnet___memcpy’ differ in signedness

    and ends with....

    ./dnet.c: At top level:
    ./dnet.c:30: warning: ‘__Pyx_PrintItem’ declared ‘static’ but never defined
    ./dnet.c:31: warning: ‘__Pyx_PrintNewline’ declared ‘static’ but never defined
    ./dnet.c:33: warning: ‘__Pyx_ReRaise’ declared ‘static’ but never defined
    ./dnet.c:34: warning: ‘__Pyx_Import’ declared ‘static’ but never defined
    ./dnet.c:35: warning: ‘__Pyx_GetExcValue’ declared ‘static’ but never defined
    ./dnet.c:38: warning: ‘__Pyx_GetStarArgs’ declared ‘static’ but never defined
    ./dnet.c:39: warning: ‘__Pyx_WriteUnraisable’ declared ‘static’ but never defined
    ./dnet.c:41: warning: ‘__Pyx_ImportType’ declared ‘static’ but never defined
    ./dnet.c:42: warning: ‘__Pyx_SetVtable’ declared ‘static’ but never defined
    ./dnet.c:43: warning: ‘__Pyx_GetVtable’ declared ‘static’ but never defined
    ./dnet.c:44: warning: ‘__Pyx_CreateClass’ declared ‘static’ but never defined
    ./dnet.c:47: warning: ‘__Pyx_InitCApi’ declared ‘static’ but never defined
    ./dnet.c:48: warning: ‘__Pyx_ImportModuleCApi’ declared ‘static’ but never defined
    ./dnet.c: In function ‘__pyx_f_4dnet_4addr___hash__’:
    ./dnet.c:2396: warning: ‘__pyx_v_size’ may be used uninitialized in this function
    lipo: can't open input file: /var/tmp//cclgZq0Y.out (No such file or directory)
    error: command 'gcc-4.2' failed with exit status 1

    Any ideas on a way to solve?

    ReplyDelete
  5. Just upped to 10.6.8 and same issue.

    ./dnet.c: In function ‘__pyx_f_4dnet_4addr___hash__’:
    ./dnet.c:2396: warning: ‘__pyx_v_size’ may be used uninitialized in this function
    lipo: can't open input file: /var/tmp//cc5cMVGx.out (No such file or directory)
    error: command 'gcc-4.2' failed with exit status 1

    ReplyDelete
  6. Try to re/install X-Code with the Snow L DVD. the compiler GCC is in there.

    ReplyDelete
  7. Reinstalled and rebooted. Still similar error...


    ./dnet.c: In function ‘__pyx_f_4dnet_4addr___hash__’:
    ./dnet.c:2396: warning: ‘__pyx_v_size’ may be used uninitialized in this function
    lipo: can't open input file: /var/tmp//ccH8fp7C.out (No such file or directory)
    error: command 'gcc-4.2' failed with exit status 1

    ReplyDelete
  8. Go to http://code.google.com/p/pyrit/issues/list
    and search your issue, apparently there is a fix

    ReplyDelete
  9. First all .. Thank you so much for taking the time to write these great blog posts. I was wondering if you can take look at this error and give me any advice to finish the tutorial.

    My computer is a Mac Pro with NVIDIA GeForce 320M

    Thanks! Bill

    Computer-Local:~ William$ cd pyrit-read-only
    Computer-Local:pyrit-read-only William$ cd cpyrit_cuda
    Computer-Local:cpyrit_cuda William$ sudo LDFLAGS=-L/usr/local/cuda/lib python setup.py install
    Password:
    running install
    running build
    running build_ext
    /bin/sh: /usr/local/cuda/bin/nvcc: No such file or directory
    None
    Failed to execute command '/usr/local/cuda/bin/nvcc -V'
    Traceback (most recent call last):
    File "setup.py", line 175, in
    setup(**setup_args)
    File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
    File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
    File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
    File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/install.py", line 587, in run
    self.run_command('build')
    File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
    File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
    File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/build.py", line 134, in run
    self.run_command(cmd_name)
    File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
    File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
    File "setup.py", line 82, in run
    raise SystemError("Nvidia's CUDA-compiler 'nvcc' can't be " \
    SystemError: Nvidia's CUDA-compiler 'nvcc' can't be found.

    ReplyDelete
  10. "My computer is a Mac Pro with NVIDIA GeForce 320M"

    And you are running Windows 3.1?? ;-)

    To give you an example on how I feel when I read "my computer is a Mac Pro" I almost want to reply by "Sure, give me a call"

    second, the hint is in: Nvidia's CUDA-compiler 'nvcc' can't be found.

    TTYL

    ReplyDelete
  11. Plus, a Mac Pro with a NVIDIA GeForce 320M?
    I thought the GeForce 320M series were for Laptops. but I could be wrong.

    That's a Mac Pro: http://www.apple.com/macpro/

    ReplyDelete
  12. I am doing my best to understand all of the, please excuse my newbie mentality. My goal was not offend or bother you. I have spent the last week reading and trying to diagnose the problem my self. My guess is that my card is not compatible, but maybe you could confirm this.

    Model Name: MacBook Pro
    Model Identifier: MacBookPro7,1
    Processor Name: Intel Core 2 Duo
    Processor Speed: 2.66 GHz
    Number Of Processors: 1
    Total Number Of Cores: 2
    L2 Cache: 3 MB
    Memory: 4 GB
    Bus Speed: 1.07 GHz
    Boot ROM Version: MBP71.0039.B0B

    Chipset Model: NVIDIA GeForce 320M
    Type: GPU
    Bus: PCI
    VRAM (Total): 256 MB
    Vendor: NVIDIA (0x10de)
    Device ID: 0x08a0
    Revision ID: 0x00a2
    ROM Revision: 3533

    OSX: 10.6.8

    ReplyDelete
  13. it's not a matter of offending, or bothering. It's the fact that you ask for a diagnostic but leave 50% of what is needed. It's a bit like calling a doctor, saying "I am sick" then hanging up. All of that in the expectation to receive a proper prognosis.
    We can't read your mind, nor can guess what OS you are running. (now, we know...)

    Uninstall your current drivers,

    Re-install CUDA drivers 3.0 Not 3.1, not 3.2

    Apparently your 320M -should- work with the old(er) drivers.

    ReplyDelete
  14. Hi Again,
    We have made some progress, but have stumbled on the the "pyrit list_cores" where the response is "-bash: pyrit: command not found".


    Computer-Local:cpyrit_cuda William$ sudo LDFLAGS=-L/usr/local/cuda/lib python setup.py install
    running install
    running build
    running build_ext
    Compiling CUDA module using nvcc 3.0, V0.2.1221...
    Executing '/usr/local/cuda/bin/nvcc -m64 --host-compilation C -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu'
    Building modules...
    building 'cpyrit._cpyrit_cuda' extension
    creating build
    creating build/temp.macosx-10.6-universal-2.6
    gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -I/usr/local/cuda/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _cpyrit_cuda.c -o build/temp.macosx-10.6-universal-2.6/_cpyrit_cuda.o -Wall -fno-strict-aliasing -DVERSION="0.4.1-dev (svn r308)"
    creating build/lib.macosx-10.6-universal-2.6
    creating build/lib.macosx-10.6-universal-2.6/cpyrit
    gcc-4.2 -Wl,-F. -bundle -undefined dynamic_lookup -L/usr/local/cuda/lib -arch i386 -arch ppc -arch x86_64 build/temp.macosx-10.6-universal-2.6/_cpyrit_cuda.o -lcrypto -lcuda -lz -o build/lib.macosx-10.6-universal-2.6/cpyrit/_cpyrit_cuda.so
    ld: warning: in /usr/local/cuda/lib/libcuda.dylib, missing required architecture ppc in file
    running install_lib
    copying build/lib.macosx-10.6-universal-2.6/cpyrit/_cpyrit_cuda.so -> /Library/Python/2.6/site-packages/cpyrit
    running install_egg_info
    Removing /Library/Python/2.6/site-packages/cpyrit_cuda-0.4.1_dev._svn.r308_-py2.6.egg-info
    Writing /Library/Python/2.6/site-packages/cpyrit_cuda-0.4.1_dev._svn.r308_-py2.6.egg-info
    Computer-Local:cpyrit_cuda William$ pyrit list_cores
    -bash: pyrit: command not found

    I really not sure what I am looking for, but I do see a warning "ld: warning: in /usr/local/cuda/lib/libcuda.dylib, missing required architecture ppc in file" that may be the problem. I manually looked to see if the file is in that location and it is. Not sure what else I can do. Thanks for the support, I hope one day to figure this out.

    ReplyDelete
  15. missing required architecture ppc in file

    --> can be safely ignored
    --> What is going on if you just type "pyrit"?
    --> are you on 64 or 32bit ?
    --> http://pyrit.wordpress.com/2011/07/30/compiling-pyrit-on-osx-lion/
    --> have you tried to check http://code.google.com/p/pyrit/

    ReplyDelete
  16. Sadlly, my CUDA cores do not show up :(

    Pyrit 0.4.1-dev (svn r308) (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
    This code is distributed under the GNU General Public License v3+

    The following cores seem available...
    #1: 'CPU-Core (SSE2)'
    #2: 'CPU-Core (SSE2)'
    #3: 'CPU-Core (SSE2)'
    #4: 'CPU-Core (SSE2)'

    This is on OS X Lion Macbook Pro with a 330M.

    Are there known issues? I followed this guide to the letter, tried different CUDA drivers and SDK toolkits just to make sure.

    ReplyDelete
  17. Thanks for this, it's been very helpful.

    A few questions:


    Can import_passwords read RAR files, or just .gz?

    Where on my computer is the DB stored ("file://")? And if I read a zipped package, does it store the text compressed (I have an 80 gig word file that is 1 gig when compressed and I'm short on space)?

    Lastly, I've struggled to get [pyrit] working as a standalone command. Editing my .profile didn't seem to work. I've been using the path to the exe directly every command. Any idea what can be helped there?

    ReplyDelete
  18. I have never tried .rar you can make a small one and try it, then let us know.

    "DB stored"
    you are very close to a LMGTFY
    ~/.pyrit/blobspace

    "path to the exe directly every command"
    .exe ??? <- ;-)
    drag and drop in trml

    ReplyDelete
  19. viperrt10acrg

    1) read comments.

    2) http://bit.ly/uUFwYF

    ReplyDelete
  20. Sorry, I meant "exec". Was just reading the OS X info, etc.

    I got this working fine on my old mac mini (albeit with drag-into-terminal method), but my new mini running a Geforce 320m isn't showing GPU cores. It's not officially supported (on the list).

    I've seen this issue around, mostly fixed by installing CUDA 3.0 drivers. When I did that (and the corresponding toolkit) the error changed from

    ImportError: cannot import name _cpyrit_cuda

    to

    ImportError: CUDA seems to be unavailable or no device reported.

    What am I missing? Should I just trash all my installs and start fresh with 3.0? (not sure how to uninstall drivers and toolkits).


    BTW, I think .rar is fine, at least pyrit thinks it is (no errors). However, I think it loses info somehow. My 80 gig as a .rar is 1 gig, but as a .gz is 5. The 1 was "read" in a snap, the .gz is taking ages, as it probably should. 575 million lines so far...

    ReplyDelete
  21. http://forums.nvidia.com/index.php?showtopic=167891

    ReplyDelete
  22. Yea I read that too. Like I said, I installed 3.0 for drivers and toolkit, but the error output, according to pyrit's googlecode, indicates that the driver is too old, which is backwards.

    I'm not sure where to proceed from here. Could it have something to do with where pyrit is searching for the drivers?

    ReplyDelete
  23. hello, im a newbie and i tried install libdnet but when i type in terminal ./configure the output says: hecking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... no
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking build system type... i386-apple-darwin10.8.0
    checking host system type... i386-apple-darwin10.8.0
    checking for gcc... no
    checking for cc... no
    checking for cc... no
    checking for cl... no
    configure: error: no acceptable C compiler found in $PATH

    ReplyDelete
  24. you must have missed the last line of this post
    "Comments:
    Please read this before commenting"

    ReplyDelete
  25. so can you help me please? what do i have to do? thx

    ReplyDelete
  26. I just wanted to pass along some information. I'm running Snow Leopard 10.6.8 had some troubles along the way. Here's what worked for me.

    I installed xcode 4.02, cudadriver-4.1.29-macos, cudatoolkit_4.1.28_macos, and macports and ran:

    sudo /opt/local/bin/port install scapy

    I had trouble compiling pyrit (it was complaining about the ppc architecture, like mentioned above for Lion). I edited my .bash_profile, but it had no effect. I'm guessing it was getting passed through sudo. Instead, I ran:

    sudo ARCHFLAGS="-arch x86_64" python setup.py install
    to install pyrit

    and
    sudo ARCHFLAGS="-arch x86_64" LDFLAGS=-L/usr/local/cuda/lib python setup.py install
    to install pyrit cuda


    Benchmark seems to work; have yet to attack any real data.

    ReplyDelete
  27. Thanks for the heads up. Do you have any data on your benchmark?.

    ReplyDelete
  28. $ pyrit benchmark_long
    Pyrit 0.4.1-dev (svn r308) (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
    This code is distributed under the GNU General Public License v3+

    Running benchmark (2330.5 PMKs/s)... \

    Computed 2330.52 PMKs/s total.
    #1: 'CUDA-Device #1 'GeForce 320M'': 1691.0 PMKs/s (RTT 3.0)
    #2: 'CPU-Core (SSE2)': 658.9 PMKs/s (RTT 2.9)



    MacBook Pro, Intel Core 2 Duo, 2.4 GHz, 4 GB RAM

    I'll continue to use Amazon's EC2 ( http://www.securitytube.net/video/1984 ) for batch processing, but if I just need a single key, CUDA is great. Most folks around here are pretty creative about naming their ESSIDs, so rainbow tables won't be of much help. I'm getting about a 40% success rate with the V701 wordlist. Mighty fine!

    ReplyDelete
  29. 40% success rate with the Master Passwords is indeed Mighty fine!!!,
    For those who reads comments it's available here: http://easymactips.blogspot.com/2009/11/support-donate.html

    ESSIDs: I would stick to the most used. Nevertheless, with Pyrit you can always add passwords to the database without having to recompute the entire database. If you add an ESSID to a rainbow, then yes: Recompute.

    PMKs/s
    As a rule of thumb, when I use Pyrit Cuda, I quit every single app that uses resources: You can gain up to 30% in speed.

    ReplyDelete
  30. excuse me will it work on a mac osx 10.5.8

    ReplyDelete
  31. I don't know, I have not tried on 10.5

    ReplyDelete