{"id":19851873,"url":"https://github.com/stackoverflowexcept1on/ip-spoofing","last_synced_at":"2025-06-24T08:03:32.530Z","repository":{"id":65356914,"uuid":"538512093","full_name":"StackOverflowExcept1on/ip-spoofing","owner":"StackOverflowExcept1on","description":"Library to send fake IPv4 headers \u0026 UDP/TCP-SYN packets to perform L3/L4 attacks","archived":false,"fork":false,"pushed_at":"2024-09-08T22:06:22.000Z","size":33,"stargazers_count":17,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-02T00:32:20.008Z","etag":null,"topics":["fake-packets","ip-spoofing","linux","network-programming","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StackOverflowExcept1on.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-19T13:19:06.000Z","updated_at":"2025-04-09T09:48:56.000Z","dependencies_parsed_at":"2024-09-08T23:30:03.198Z","dependency_job_id":null,"html_url":"https://github.com/StackOverflowExcept1on/ip-spoofing","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"fb3ce2704c8c8aa1eefbaec9ac817b862e82b2c1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StackOverflowExcept1on/ip-spoofing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackOverflowExcept1on%2Fip-spoofing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackOverflowExcept1on%2Fip-spoofing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackOverflowExcept1on%2Fip-spoofing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackOverflowExcept1on%2Fip-spoofing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StackOverflowExcept1on","download_url":"https://codeload.github.com/StackOverflowExcept1on/ip-spoofing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackOverflowExcept1on%2Fip-spoofing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261632032,"owners_count":23187268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fake-packets","ip-spoofing","linux","network-programming","rust"],"created_at":"2024-11-12T13:33:04.169Z","updated_at":"2025-06-24T08:03:32.489Z","avatar_url":"https://github.com/StackOverflowExcept1on.png","language":"Rust","readme":"### ip-spoofing\n\n[![Build Status](https://github.com/StackOverflowExcept1on/ip-spoofing/workflows/CI/badge.svg)](https://github.com/StackOverflowExcept1on/ip-spoofing/actions)\n[![Latest Version](https://img.shields.io/crates/v/ip-spoofing.svg)](https://crates.io/crates/ip-spoofing)\n[![Documentation](https://docs.rs/ip-spoofing/badge.svg)](https://docs.rs/ip-spoofing/)\n\n[![asciicast](https://asciinema.org/a/7jR9ycBIxIZkviA4sgm9niXbI.svg)](https://asciinema.org/a/7jR9ycBIxIZkviA4sgm9niXbI)\n\nLibrary to send fake IPv4 headers \u0026 UDP/TCP-SYN packets to perform L3/L4 attacks\n\nIn short, this library allows you to spoof your IP address on the network. For a better understanding, it is recommended\nto read the article from cloudflare:\n[The real cause of large DDoS - IP Spoofing](https://blog.cloudflare.com/the-root-cause-of-large-ddos-ip-spoofing/)\n\nIt can be done on the L3 (network layer) of the [OSI model](https://en.wikipedia.org/wiki/OSI_model#Layer_architecture)\n\nToday, not all ISPs check the integrity of IPv4 headers.\nTherefore, in a real network, there are 2 options for spoofing IP addresses:\n\n1. network level IP spoofing\n\n   e.g. you have a server with the address `195.174.232.102`, and the provider owns the IP\n   range `195.174.224.0 - 195.174.239.255`, this means that you can use any address from the range\n\n2. unlimited IP spoofing\n\n   this allows you to spoof any ip address, you can pretend you own the address `8.8.8.8` (Google Public DNS)\n\nThe only limitation of spoofing is that you can send packets, but you cannot receive a response from the server.\n\nYou can check if this library works on your local network.\nTo attack real networks, you need a specific provider that allows one of 2 spoofing options.\n\n### Code samples\n\nYou can see other code samples in the [`examples/`](examples) directory.\n\n```rust\nuse ip_spoofing::{self, RawSocket, ReusablePacketWriter};\n\n/// This example shows how to generate fake UDP packet\n/// that delivers `b\"hey\"` bytes from \"8.8.8.8:1234\" to \"127.0.0.1:5678\".\n///\n/// I.e. the attacker changes its IPv4 address to 8.8.8.8 (Google Public DNS)\nfn main() -\u003e ip_spoofing::Result\u003c()\u003e {\n    let socket = RawSocket::new()?;\n    let mut writer = ReusablePacketWriter::new();\n\n    socket.send_fake_udp_packet(\n        \u0026mut writer,\n        [8, 8, 8, 8],   //source IPv4 address\n        1234,           //source port\n        [127, 0, 0, 1], //destination IPv4 address\n        5678,           //destination port\n        b\"hey\",         //data\n        64,             //TTL on most Linux machines is 64\n    )?;\n\n    Ok(())\n}\n```\n\n### Useful links\n\n- [Internet Protocol version 4](https://en.wikipedia.org/wiki/Internet_Protocol_version_4) wikipedia article describing\n  the IPv4 header\n\n- [rickettm/SendIP](https://github.com/rickettm/SendIP) repository provides command line tool to allow sending arbitrary\n  IP packets\n\n  useful code of the SendIP project written in C:\n    - [creating raw sockets](https://github.com/rickettm/SendIP/blob/aad12a001157489ab9053c8665e09aec24a2ff6d/sendip.c#L143)\n    - [IPv4 header structure](https://github.com/rickettm/SendIP/blob/aad12a001157489ab9053c8665e09aec24a2ff6d/ipv4.h)\n    - [IPv4 header checksum](https://github.com/rickettm/SendIP/blob/aad12a001157489ab9053c8665e09aec24a2ff6d/csum.c)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackoverflowexcept1on%2Fip-spoofing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackoverflowexcept1on%2Fip-spoofing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackoverflowexcept1on%2Fip-spoofing/lists"}