Writing a 802.11 fuzzer which supports testing with WPA security enabled - wpa

I'm writing a fuzzer (in python) and the testing environment will be using WPA/WPA2 security. For this, I will need to either write a WPA encryption/decryption module myself or reuse WPA code from somewhere. I'm told that writing WPA code from scratch is very time consuming.
So I thought of extracting WPA code from any unix like OS's wifi device driver's source. After a lot of googling, I also came across pyrit (this may be a viable option since the fuzzer will be written in python), but I couldn't figure out how to extract and use the code as per my needs.
What will be the best place to reuse WPA code from? Or should I write the code from scratch myself?

Found that on stackoverflow :
wpa-handshake with python - hashing difficulties
Also there is a python pypi for wifi :
https://pypi.python.org/pypi/python-wifi/0.5.0

Related

QR Code reading/writing in Ruby

What's the easiest way to add QR Code reading/writing capabilities to a Ruby (2.0) program (if it helps, the codes will be written to and read from PDFs)? All of the gems I've found seem to have not been updated in quite some time, and usually have a ton of dependencies. Are there any good options out there?
https://github.com/smparkes/zxing.rb
YMMV, I'm the author. But I'm also the primary C++ maintainer of zxing and I use zxing.rb for a lot of testing so it should be as up-to-date as the C++ port is.
No comment on the number of dependences: they're not a barrier for me, obviously.

Is There a Windows SMB Client Opened Implement

There was a smbmrx sample code using RDBSS in WDK Vista.
But since WDK 7600 has been released, the sample was removed. -Do you know why?
I'm finding a nice sample code to learn RDBSS.
Is there a good open source better than smbmrx sample?
It was probably removed because it was getting long in the tooth. It was never the full SMB redirector implementation shipped with Windows, it was some subset of the original version. It also uses TDI which is being deprecated in newer Windows in favor of WSK.
I don't know of any good open source examples. A network redirector is a complicated piece of software to write and there's value there for anyone brave enough to go for it. Why do you need this?
-scott

What modbus library should I use for modbus protocol for GCC

We are building a product, which requires modbus communication (both rs-485 and TCP/IP). The code has to run on an embedded device which has Linux running on it. We have following criteria for the selecting the library that we would be using.
It has to be opensource, since we are opensource geeks.
We would give this product to our users and what their application would be we are not aware, hence it has to complete implementation of the modbus protocol.
Wide user base: What we believe is that greater the users of the code, more the stability of the code.
I came across two such libraries:
http://www.freemodbus.org
and
libmodbus
Are there any more modbus libraries. Please suggest with pros and cons
I'd suggest libmodbus, it works well and is cross platform.
http://www.libmodbus.org
I am just starting to explore these options as well. My priority is on ease of use which has led me to RModBus since it was the only one that I was able to get immediate results with. However, there is also a Python library, Pymodbus, that appears to be quite complete in implementation.
I'm sorry, I just figured out that GCC is a compiler; my answer is way off topic.
Again, I was looking for a scripting language that my noob self could be more comfortable in. It really came down to a question of language rather than the library itself. Oh, I am only using the TCP/IP stack at this time, which somewhat simplifies it as well.

Basic example of serial communication with Windows XP/win32

I am working with a peripheral device that needs to be communicated through serial. I can send it commands using HyperTerminal, but now I need to write programs that will let me do it without HyperTerminal. Can somebody point me to a website and/or show me a sample hello world program to get me started? I have searched through many sites which give me uncompilable/ancient VC6 code.
In order to interface with the serial port, you open a file with one of the special filenames "COM1" through "COM9". For serial ports with higher numbers, the special filename begins with \\?\, which in C/C++ code must be escaped as "\\\\?\\COM10", etc.
http://msdn.microsoft.com/en-us/library/ms810467.aspx has a really good tutorial on using the serial port. Note that you should use the Windows file I/O functions such as CreateFile(), ReadFile(), and WriteFile(). I'm not sure if it will work to use standard I/O functions such as fopen(), fread(), and fwrite().
Microsoft provides an article with sample code describing how to do this under Win32.
Boost:asio may be able to help as a serial device was added recently.
Fair warning though; the serial port documentation is light, presumably since it's quite new (it was added in asio 1.1.1 which was included in boost 1.36).
But working your way through asio is, IMHO, a better solution than using the raw Win32 API. Why? It'll be easier to read and maintain (it's a higher level API) and it'll be cross platform (except where you need to specify the OS-specific device name).
The Boost - Users and asio.user mailing lists are quite active and friendly and ought to be able to help you out if you get stuck.
If using .NET 2.0 see System.IO.Ports and this article should be helpful. If direct Win32, then Adam's answer is best.
I believe you will find plenty of sample code for C# as well if you find VC6 too ancient. I think there are also a bunch of "free" serial/COM port wrappers but I just wrote my own when I wrote an RS232 device controller piece of software.
google C# and serial port or rs232
I got these:
http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx
http://msmvps.com/blogs/coad/archive/2005/03/23/SerialPort-_2800_RS_2D00_232-Serial-COM-Port_2900_-in-C_2300_-.NET.aspx
You should have no problem finding suitable code with a google search.

Common Lisp GUI Programming With System Calls

Can anyone tell me about using (Steel Bank) Common Lisp for writing GUIs via system calls? I know there are some libraries out there but this is a language learning exercise, so I want to do it myself.
I'm developing on Kubuntu 8.10 and SBCL 1.0.18.
Thanks.
You can take a closer look at the sb-posix-package. But as the page sais "The functionality contained in the package SB-UNIX is for SBCL internal use only; its contents are likely to change from version to version."
Another Possibility - the one I would choose - is to include the C-syscall(2)-Instruction via CFFI, and then perform it.
To create a windowed GUI, you must use X11, at least to give you a Window to paint on. Therefore, you must know the X11-Specifications to create a window, and implement the Syscalls for accessing Unix Domain Sockets, or initiating shm-devices etc.
If you just want graphics on a console, you could think of using the framebuffer-device /dev/fb*. You need ioctl(2)'s and the syscalls for read(2)ing and write(2)ing to use it, but still, I think this would be a lot easier than using X11 for this (even though still a lot of work). Maybe you shoudld look at the sourcecode for libFB or something similar to see how to initialize it, etc.
Is this really what you want to do? This is a lot of work, you will learn a lot, but more about the linux system infrastructure, rather than about SBCL, I think. If you want to use Syscalls under SBCL, maybe its better to try to open TCP-Sockets only with Linux-Syscalls - alone this can take hours of frustration.
By writing GUI via system calls you mean not using any GUI toolkit such as Gtk+ or Qt? In such case, you should talk directly to the X-server via socket and implement all the X11 protocol (or use CLX) and GUI on top of it. But that is not an easisest task, because X11 is complex.
In case you decide to dig into X11, there are some links for specifications: http://www.xfree86.org/current/specindex.html
http://www.freedesktop.org/wiki/Specifications?action=show&redirect=Standards

Resources