How to simulate DOS attacks using DARPA dataset or pcap files? - dataset

I am working on my master's thesis which is about XML-HTTP DOS attacks.
I have some pcap files and DARPA dataset but I don't know how to use them to simulate DOS attacks ?
I used Wireshark to open files and it works but it shows just information.
Do I need to write a program to apply these datasets? Or already exist some tools ?
Thanks in advance

This is an example of C code used to read in a pcap file (as output by tcpdump or wireshark) with the pcap library. This code is only tested to work on my system (OS X 10.5 and gcc), so let me know if it doesn’t work on yours.
To use: install the pcap libraries on your system and compile with the “-lpcap” switch. For this program the command line arguments are a list of pcap files to read in. The program keeps track of simple byte counts and traffic volume, but illustrates the use of pcap_next and how to access the data in the packet (in this case to get at the IP header).
try this:
http://inst.eecs.berkeley.edu/~ee122/fa07/projects/p2files/packet_parser.c
or this:
http://code.google.com/p/pcapsctpspliter/issues/detail?id=6

Related

Serial Port Program crashes (no core dump)

im making a C project for university in Linux, its basicaly a protocol for file transfer between 2 computers. The program works fine and it sends many files without any problem, but there is 1 or 2 files i have tested and the program just crashes without any report and i just dont know how to debug the problem. Any help would be appreciated.
I also dont know if i should post the code or not, because both files (application and protocol) have over 1.5k lines of code.
In most Linux Distributions the core dumping is disable by default (which can be viewed from the system resource limit "ulimit -c" will be zero if it is disabled). To enable the same, use "ulimi -c unlimited".
To add, in Ubuntu like modern distributions, they have customized program to send the report/core file to Ubuntu developers specified in "/proc/sys/kernel/core_pattern". Make sure to change it for development purpose to debug further.
You can even try "valgrind" or "gdb live debugging" to have more clarity about the problem.

How to get harddrive serial number in C or asm without wmi

how to get harddrive serial number(not the volume # wich change at each reinstall of windows) in C or asm, without wmi (cause wmi required admin right). Any clue would be helpfull cause right now i found nothing on web in C without wmi, in dayss of searching... Thank you.
EDIT : For windows system
Please try my open source tool, DiskId32, which also has the source code at http://www.winsim.com/diskid32/diskid32.html . I only have an Win32 version at this time. Maybe some day I will add a Win64 version.
Hard drive serial number and other information about the harddrive like firmware version, etc. can only be obtained using SMART as far as I know and that requires special ioctls to the the block device node (/dev/sda or /dev/sdb) which is usually not available to a regular user.
I know there is a tool called smartctl which does exactly this:
sudo smartctl -i /dev/sda
Similar tools exist (hdparm, lshw, etc.) as well.
As far as trying to figure it out this info without being a privileged user, it might be possible only if it is exposed via /proc or /sys which I highly doubt is being done in the current SATA block device drivers.

Opening .pkt (Omnipeek capture) file in C

I would like to open an omnipeek (.pkt) file in a C program. How do I do it? Conversion to .pcap and opening via pcap library results in loss of important radio information. Can I have a sample program which reads a .pkt file offline?
Thanks!
Well, Wireshark is a sample program that does that, albeit a large one. See the wiretap/peekclassic.c file for the "classic" Peek format (used in older versions of WildPacket's software) and wiretap/peektagged.c for the "tagged" Peek format (used in current versions of their software).
You might want to handle more radio information in the "tagged" format than Wireshark currently handles.
WildPackets tech support can provide you with documentation of the file format. Also, recent versions of OmniPeek will include the radio information when saving in pcap format.

HINTERNET InternetOpenUrl() on linux C

I am a native windows programmer and I was just starting to develop some applications on linux. I was wondering if there is a linux function similar to InternetOpenUrl(). I wanted to use this so I could open the Speakeasy speed test to download random images according to size to "speed test" internet connections. If there isn't a similar command does anyone have some C code for initiating a http socket to a server to download a file (or code to do the same on a ftp although i rather not use ftp). I would rather use the InternetOpenUrl() alternative if there is one but i am also open to other methods as well.
You're looking for libcurl, which incidentally also works on Windows.

Write a program that extracts the contents of an RPM file on Windows

I am looking to write a program that will extract the contents of an RPM file and do some validation checks. I'll be using Qt for the interface so that the program can be run in Windows and Linux.
Are there any suggestions for extracting the contents for an RPM file on Windows? I would prefer a C library, but other suggestions are welcome also.
rpmlib looks like what you are after.

Resources