{"id":1299,"date":"2025-09-03T10:34:02","date_gmt":"2025-09-03T10:34:02","guid":{"rendered":"https:\/\/www.zframez.com\/articles\/?p=1299"},"modified":"2025-09-03T10:34:05","modified_gmt":"2025-09-03T10:34:05","slug":"introduction-to-hping3","status":"publish","type":"post","link":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3","title":{"rendered":"Introduction to Hping3"},"content":{"rendered":"<body>\n<h1 class=\"wp-block-heading has-large-font-size\"><strong>Hping3 Tutorial: Packet Crafting and Port Scanning<\/strong><\/h1>\n\n\n\n<p>When we use the basic <strong>ping<\/strong> command, it generates only ICMP Echo Request packets to test reachability. But sometimes we need more flexibility, for example, to test TCP or UDP responses, or even to check if a particular port is open. This is where <strong>hping3<\/strong> comes in.<\/p>\n\n\n\n<p>Hping3 is a powerful packet crafting tool that allows us to create and send <strong>TCP, UDP, and ICMP packets<\/strong> (and even raw IP packets if required). You can think of it as an advanced version of ping with far more features. It works directly from the command line interface (CLI) and is available on most Linux distributions.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<h2 class=\"wp-block-heading has-large-font-size\"><strong>Installing Hping3<\/strong><\/h2>\n\n\n\n<p>If you are using Ubuntu or Debian, you can install hping3 with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install hping3<\/code><\/pre>\n\n\n\n<p>On CentOS or Fedora, the command is slightly different:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install hping3\u00a0\u00a0\u00a0\u00a0\u00a0 # CentOS\/RHEL\nsudo dnf install hping3\u00a0\u00a0\u00a0\u00a0\u00a0 # Fedora<\/code><\/pre>\n\n\n\n<p>In some systems hping3 may not be available in the default packages. In that case, you will need to download the source code and install it manually.<\/p>\n\n\n\n<p>Since hping3 works directly with the network stack, it needs root privileges. You can either switch to root mode using sudo -i or just type sudo before the command each time.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p>To understand hping3 better, let\u2019s use a simple setup with two PCs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1024\" height=\"433\" src=\"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-122046.png?resize=1024%2C433&#038;ssl=1\" alt=\"Network diagram showing PC1 with IP 10.1.1.1\/8 connected directly to PC2 with IP 10.2.2.2\/8 using a cable.\" class=\"wp-image-1300\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-122046.png?resize=1024%2C433&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-122046.png?resize=300%2C127&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-122046.png?resize=768%2C325&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-122046.png?w=1251&amp;ssl=1 1251w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption class=\"wp-element-caption\">Basic two-PC network topology for running hping3 commands<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading has-large-font-size\"><strong>Examples of Hping3 Commands<\/strong><\/h2>\n\n\n\n<p>From <strong>PC1<\/strong>, you can try:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo -i\nhping3 10.2.2.2<\/code><\/pre>\n\n\n\n<p>First we use the command <strong><code>sudo -i<\/code><\/strong> to switch to root mode, because hping3 needs root privileges to run. Then we run <strong><code>hping3 10.2.2.2<\/code><\/strong> , this will send TCP packets to PC2. By default, hping3 uses destination port 0, which usually has no application running, so the response we get will most likely have the flags <strong>RST + ACK<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1024\" height=\"391\" src=\"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142701.png?resize=1024%2C391&#038;ssl=1\" alt=\"Terminal output showing hping3 sending 4 TCP packets to 10.2.2.2 with responses from port 0 and flags RA.\" class=\"wp-image-1301\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142701.png?resize=1024%2C391&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142701.png?resize=300%2C114&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142701.png?resize=768%2C293&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142701.png?resize=1536%2C586&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142701.png?w=1591&amp;ssl=1 1591w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption class=\"wp-element-caption\">Example of using hping3 with <code>-c<\/code> option to send 4 packets<\/figcaption><\/figure>\n\n\n\n<p>In this example, we used the option <strong>-c 4<\/strong> to stop the hping3 process after sending 4 packets. Otherwise, the command would continue running until you manually stopped it with <strong>Ctrl + C<\/strong>.<\/p>\n\n\n\n<p>The output shows 4 responses received from PC2. Notice that the field <strong>sport=0<\/strong> indicates the responses are coming from source port 0. The section <strong>flags=RA<\/strong> means the Reset and Ack flag bits are set, which tells us that port 0 is closed on PC2. <\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p><strong>Setting Ports and Flags<\/strong><\/p>\n\n\n\n<p>Hping3 lets you control source and destination ports as well as TCP flag bits.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>-p : Destination port<\/li>\n\n\n\n<li>-s : Source port<\/li>\n\n\n\n<li>-S : SYN flag<\/li>\n\n\n\n<li>Other flags like -A (ACK), -F (FIN), -R (RST) are also available.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example: Checking if port 80 is open on PC2<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hping3 -p 80 10.2.2.2 -S<\/code><\/pre>\n\n\n\n<p>The option <strong>-S<\/strong> sets the SYN flag bit. With this flag, an open port responds with <strong>SYN + ACK<\/strong>, while a closed port usually replies with <strong>RST + ACK<\/strong>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If the response is <strong>SYN + ACK<\/strong>, it means port 80 is open (an HTTP server is running).<\/li>\n\n\n\n<li>If the response is <strong>RST + ACK<\/strong>, it means port 80 is closed.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p><strong>Incrementing Port Numbers<\/strong><\/p>\n\n\n\n<p>You can also increment port numbers automatically using ++.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hping3 -p ++80 10.2.2.2 -S -c 10<\/code><\/pre>\n\n\n\n<p>If you send 10 packets, the destination ports will be 80 through 89. This is useful for scanning a range without typing multiple commands.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1024\" height=\"386\" src=\"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142839.png?resize=1024%2C386&#038;ssl=1\" alt=\"Output of hping3 scanning ports 20 to 24 on 10.2.2.2, showing SYN+ACK response on port 23 indicating Telnet is open.\" class=\"wp-image-1302\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142839.png?resize=1024%2C386&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142839.png?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142839.png?resize=768%2C290&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142839.png?resize=1536%2C579&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142839.png?w=1594&amp;ssl=1 1594w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption class=\"wp-element-caption\">Hping3 command with incremental destination ports and SYN flag set<\/figcaption><\/figure>\n\n\n\n<p><br>Here the option <strong>-p ++20<\/strong> means the destination port numbers start from 20 and increase with each packet. So the first packet goes to port 20, the second to port 21, and so on.  The option <strong>-c 5<\/strong> limits the test to 5 packets.<\/p>\n\n\n\n<p>In the output, you can see the \u201csport\u201d field changing with each response. For ports 20, 21, 22, and 24 the flags are <strong>RA<\/strong>, showing those ports are closed. But for port 23 the response contains <strong>SA<\/strong>, meaning SYN + ACK. This confirms that port 23 (Telnet) is open on PC2.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p><strong>Sending UDP Packets<\/strong><\/p>\n\n\n\n<p>To generate UDP packets, use the <strong>-2<\/strong> option.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hping3 -2 10.2.2.2<\/code><\/pre>\n\n\n\n<p>This will send UDP packets to PC2. You can combine this with the -p option to target specific UDP ports.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p><strong>Sending ICMP Packets<\/strong><\/p>\n\n\n\n<p>If you want hping3 to behave like the normal ping command, use <strong>-1<\/strong> for ICMP Echo Requests:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hping3 -1 10.2.2.2<\/code><\/pre>\n\n\n\n<p>This sends ICMP Echo Requests to PC2, similar to the standard ping.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<h2 class=\"wp-block-heading has-large-font-size\"><strong>Port Scanning with Hping3<\/strong><\/h2>\n\n\n\n<p>One of the most powerful features of hping3 is <strong>port scanning<\/strong>. You can check which services are running on a target system by probing a range of ports.<\/p>\n\n\n\n<p>Use the \u2013scan option along with a port range and a flag.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hping3 --scan 0-1023 10.2.2.2 -S<\/code><\/pre>\n\n\n\n<p>This scans all <strong>well-known ports (0\u20131023)<\/strong> on PC2. Open ports will reply with <strong>SYN + ACK<\/strong>, showing you which applications are running.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1024\" height=\"388\" src=\"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142333.png?resize=1024%2C388&#038;ssl=1\" alt=\"Hping3 port scan result on 10.2.2.2 showing only port 23 open and other ports closed.\" class=\"wp-image-1303\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142333.png?resize=1024%2C388&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142333.png?resize=300%2C114&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142333.png?resize=768%2C291&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142333.png?resize=1536%2C583&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142333.png?w=1595&amp;ssl=1 1595w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption class=\"wp-element-caption\">Port scan with hping3 across range 0\u201350 using SYN flag<\/figcaption><\/figure>\n\n\n\n<p>In this example, hping3 is scanning all ports in the range 0 to 50 on PC2. The <strong>-S<\/strong> option keeps the SYN flag bit set.<\/p>\n\n\n\n<p>The output shows that only port 23 is open on PC2, which matches the Telnet service. All other ports in the range returned reset responses, meaning they are closed.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p><strong>Summary<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Ping<\/strong> only uses ICMP, but <strong>hping3<\/strong> can craft TCP, UDP, and ICMP packets.<\/li>\n\n\n\n<li>It requires root privileges.<\/li>\n\n\n\n<li>You can control ports and TCP flags, making it useful for <strong>troubleshooting, security testing, and learning how protocols behave<\/strong>.<\/li>\n\n\n\n<li>Features like \u2013scan make it handy for identifying open ports on a target system.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n<\/body>","protected":false},"excerpt":{"rendered":"<p>Hping3 Tutorial: Packet Crafting and Port Scanning When we use the basic ping command, it generates only ICMP Echo Request packets to test reachability. But sometimes we need more flexibility, for example, to test TCP or UDP responses, or even to check if a particular port is open. This is where hping3 comes in. Hping3 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"wp-custom-template-post-with-sidebar2","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[392],"tags":[393,394,395,401,400,396,398,397,399],"class_list":["post-1299","post","type-post","status-publish","format-standard","hentry","category-testing-tools","tag-hping3","tag-hping3-commands","tag-hping3-examples","tag-hping3-installation","tag-hping3-linux","tag-hping3-port-scan","tag-hping3-tcp-udp-icmp","tag-hping3-tutorial","tag-packet-crafting-tool"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Introduction to Hping3 - Tutorials<\/title>\n<meta name=\"description\" content=\"Learn the basics of hping3, a powerful network tool to create TCP, UDP, and ICMP packets. See examples of commands, port scanning, and packet flags explained step by step.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introduction to Hping3 \u2013 Packet Crafting and Port Scanning Explained\" \/>\n<meta property=\"og:description\" content=\"Hping3 goes beyond the normal ping command. Discover how to use it for creating TCP, UDP, and ICMP packets, checking open ports, and understanding flag responses with simple examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3\" \/>\n<meta property=\"og:site_name\" content=\"Tutorials\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/zframez\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-03T10:34:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-03T10:34:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142333.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1595\" \/>\n\t<meta property=\"og:image:height\" content=\"605\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"sajith achipra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@zframez\" \/>\n<meta name=\"twitter:site\" content=\"@zframez\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"sajith achipra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/testing-tools\\\/introduction-to-hping3#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/testing-tools\\\/introduction-to-hping3\"},\"author\":{\"name\":\"sajith achipra\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#\\\/schema\\\/person\\\/8b3b88007644501771d2452d3cc80f41\"},\"headline\":\"Introduction to Hping3\",\"datePublished\":\"2025-09-03T10:34:02+00:00\",\"dateModified\":\"2025-09-03T10:34:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/testing-tools\\\/introduction-to-hping3\"},\"wordCount\":821,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/testing-tools\\\/introduction-to-hping3#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/Screenshot-2025-09-03-122046-1024x433.png\",\"keywords\":[\"hping3\",\"hping3 commands\",\"hping3 examples\",\"hping3 installation\",\"hping3 linux\",\"hping3 port scan\",\"hping3 tcp udp icmp\",\"hping3 tutorial\",\"packet crafting tool\"],\"articleSection\":[\"testing tools\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.zframez.com\\\/articles\\\/testing-tools\\\/introduction-to-hping3#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/testing-tools\\\/introduction-to-hping3\",\"url\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/testing-tools\\\/introduction-to-hping3\",\"name\":\"Introduction to Hping3 - Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/testing-tools\\\/introduction-to-hping3#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/testing-tools\\\/introduction-to-hping3#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/Screenshot-2025-09-03-122046-1024x433.png\",\"datePublished\":\"2025-09-03T10:34:02+00:00\",\"dateModified\":\"2025-09-03T10:34:05+00:00\",\"description\":\"Learn the basics of hping3, a powerful network tool to create TCP, UDP, and ICMP packets. See examples of commands, port scanning, and packet flags explained step by step.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/testing-tools\\\/introduction-to-hping3#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.zframez.com\\\/articles\\\/testing-tools\\\/introduction-to-hping3\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/testing-tools\\\/introduction-to-hping3#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/Screenshot-2025-09-03-122046.png?fit=1251%2C529&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/Screenshot-2025-09-03-122046.png?fit=1251%2C529&ssl=1\",\"width\":1251,\"height\":529},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/testing-tools\\\/introduction-to-hping3#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tutorials\",\"item\":\"https:\\\/\\\/www.zframez.com\\\/articles\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introduction to Hping3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#website\",\"url\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/\",\"name\":\"zframez tutorials\",\"description\":\"Learn networking bit by bit\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#organization\",\"name\":\"zframez technologies\",\"url\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/zframez-logo.jpg?fit=864%2C864&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/zframez-logo.jpg?fit=864%2C864&ssl=1\",\"width\":864,\"height\":864,\"caption\":\"zframez technologies\"},\"image\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/zframez\\\/\",\"https:\\\/\\\/x.com\\\/zframez\",\"https:\\\/\\\/www.instagram.com\\\/zframez_technologies\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#\\\/schema\\\/person\\\/8b3b88007644501771d2452d3cc80f41\",\"name\":\"sajith achipra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3d9f27c5311500982b6f19d03d0506f1c328f30f51d8d5f73f46577687fd81f8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3d9f27c5311500982b6f19d03d0506f1c328f30f51d8d5f73f46577687fd81f8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3d9f27c5311500982b6f19d03d0506f1c328f30f51d8d5f73f46577687fd81f8?s=96&d=mm&r=g\",\"caption\":\"sajith achipra\"},\"sameAs\":[\"http:\\\/\\\/www.zframez.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Introduction to Hping3 - Tutorials","description":"Learn the basics of hping3, a powerful network tool to create TCP, UDP, and ICMP packets. See examples of commands, port scanning, and packet flags explained step by step.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3","og_locale":"en_US","og_type":"article","og_title":"Introduction to Hping3 \u2013 Packet Crafting and Port Scanning Explained","og_description":"Hping3 goes beyond the normal ping command. Discover how to use it for creating TCP, UDP, and ICMP packets, checking open ports, and understanding flag responses with simple examples.","og_url":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3","og_site_name":"Tutorials","article_publisher":"https:\/\/www.facebook.com\/zframez\/","article_published_time":"2025-09-03T10:34:02+00:00","article_modified_time":"2025-09-03T10:34:05+00:00","og_image":[{"width":1595,"height":605,"url":"https:\/\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-142333.png","type":"image\/png"}],"author":"sajith achipra","twitter_card":"summary_large_image","twitter_creator":"@zframez","twitter_site":"@zframez","twitter_misc":{"Written by":"sajith achipra","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3#article","isPartOf":{"@id":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3"},"author":{"name":"sajith achipra","@id":"https:\/\/www.zframez.com\/articles\/#\/schema\/person\/8b3b88007644501771d2452d3cc80f41"},"headline":"Introduction to Hping3","datePublished":"2025-09-03T10:34:02+00:00","dateModified":"2025-09-03T10:34:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3"},"wordCount":821,"commentCount":0,"publisher":{"@id":"https:\/\/www.zframez.com\/articles\/#organization"},"image":{"@id":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3#primaryimage"},"thumbnailUrl":"https:\/\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-122046-1024x433.png","keywords":["hping3","hping3 commands","hping3 examples","hping3 installation","hping3 linux","hping3 port scan","hping3 tcp udp icmp","hping3 tutorial","packet crafting tool"],"articleSection":["testing tools"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3","url":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3","name":"Introduction to Hping3 - Tutorials","isPartOf":{"@id":"https:\/\/www.zframez.com\/articles\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3#primaryimage"},"image":{"@id":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3#primaryimage"},"thumbnailUrl":"https:\/\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-122046-1024x433.png","datePublished":"2025-09-03T10:34:02+00:00","dateModified":"2025-09-03T10:34:05+00:00","description":"Learn the basics of hping3, a powerful network tool to create TCP, UDP, and ICMP packets. See examples of commands, port scanning, and packet flags explained step by step.","breadcrumb":{"@id":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3#primaryimage","url":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-122046.png?fit=1251%2C529&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-03-122046.png?fit=1251%2C529&ssl=1","width":1251,"height":529},{"@type":"BreadcrumbList","@id":"https:\/\/www.zframez.com\/articles\/testing-tools\/introduction-to-hping3#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Tutorials","item":"https:\/\/www.zframez.com\/articles"},{"@type":"ListItem","position":2,"name":"Introduction to Hping3"}]},{"@type":"WebSite","@id":"https:\/\/www.zframez.com\/articles\/#website","url":"https:\/\/www.zframez.com\/articles\/","name":"zframez tutorials","description":"Learn networking bit by bit","publisher":{"@id":"https:\/\/www.zframez.com\/articles\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.zframez.com\/articles\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.zframez.com\/articles\/#organization","name":"zframez technologies","url":"https:\/\/www.zframez.com\/articles\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.zframez.com\/articles\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/zframez-logo.jpg?fit=864%2C864&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/zframez-logo.jpg?fit=864%2C864&ssl=1","width":864,"height":864,"caption":"zframez technologies"},"image":{"@id":"https:\/\/www.zframez.com\/articles\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/zframez\/","https:\/\/x.com\/zframez","https:\/\/www.instagram.com\/zframez_technologies\/"]},{"@type":"Person","@id":"https:\/\/www.zframez.com\/articles\/#\/schema\/person\/8b3b88007644501771d2452d3cc80f41","name":"sajith achipra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3d9f27c5311500982b6f19d03d0506f1c328f30f51d8d5f73f46577687fd81f8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3d9f27c5311500982b6f19d03d0506f1c328f30f51d8d5f73f46577687fd81f8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3d9f27c5311500982b6f19d03d0506f1c328f30f51d8d5f73f46577687fd81f8?s=96&d=mm&r=g","caption":"sajith achipra"},"sameAs":["http:\/\/www.zframez.com"]}]}},"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1307,"url":"https:\/\/www.zframez.com\/articles\/networking-fundamentals\/introduction-to-tcp","url_meta":{"origin":1299,"position":0},"title":"Introduction to TCP","author":"sajith achipra","date":"September 12, 2025","format":false,"excerpt":"Introduction to TCP TCP and UDP are two transport layer protocols used to carry port numbers. We use these protocols to connect one process on a system to another process on the other side. Normally when a device sends a packet to a destination, it is meant to be collected\u2026","rel":"","context":"In &quot;Networking Fundamentals&quot;","block_context":{"text":"Networking Fundamentals","link":"https:\/\/www.zframez.com\/articles\/category\/networking-fundamentals"},"img":{"alt_text":"A diagram of the TCP three-way handshake showing the sequence of segments with SYN, SYN-ACK, and ACK flag bits.","src":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/TCP-three-way-connection-establishment.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/TCP-three-way-connection-establishment.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/TCP-three-way-connection-establishment.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/TCP-three-way-connection-establishment.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/TCP-three-way-connection-establishment.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/09\/TCP-three-way-connection-establishment.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":240,"url":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol-peering-and-states","url_meta":{"origin":1299,"position":1},"title":"BGP Peering Process Explained \u2013 States from Idle to Established","author":"sajith achipra","date":"July 18, 2024","format":false,"excerpt":"Understanding the BGP Peering Process When routers run BGP , they don't start exchanging route information right away. Before they can share anything, they need to form a stable connection, called a BGP peering session. This process involves multiple states, each indicating what\u2019s happening behind the scenes as the routers\u2026","rel":"","context":"In &quot;bgp&quot;","block_context":{"text":"bgp","link":"https:\/\/www.zframez.com\/articles\/category\/routing\/bgp"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/bgp-states.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/bgp-states.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/bgp-states.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/bgp-states.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/bgp-states.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/bgp-states.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":232,"url":"https:\/\/www.zframez.com\/articles\/routing\/how-bgp-works","url_meta":{"origin":1299,"position":2},"title":"How BGP Works ?","author":"sajith achipra","date":"July 17, 2024","format":false,"excerpt":"How BGP Works \u2013 Step-by-Step Flow, Packet Types, and NLRI Continuing from our introduction to BGP, let\u2019s now look at how BGP actually works - how two routers become neighbors, what packets are exchanged between them, and how route information is shared Peering in BGP \u2013 No Auto Discovery Here\u2026","rel":"","context":"In &quot;bgp&quot;","block_context":{"text":"bgp","link":"https:\/\/www.zframez.com\/articles\/category\/routing\/bgp"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1231,"url":"https:\/\/www.zframez.com\/articles\/networking-fundamentals\/networking-terminologies-a-beginners-guide-part-2","url_meta":{"origin":1299,"position":3},"title":"Networking Terminologies \u2013 A Beginner\u2019s Guide Part 2","author":"sajith achipra","date":"July 29, 2025","format":false,"excerpt":"This post continues from Part 1 and covers a few more important networking concepts. These terms often come up when learning how data moves through a network, especially when understanding how devices identify each other, how applications communicate, and how data is structured at each layer. 1. MAC Address \u2013\u2026","rel":"","context":"In &quot;Networking Fundamentals&quot;","block_context":{"text":"Networking Fundamentals","link":"https:\/\/www.zframez.com\/articles\/category\/networking-fundamentals"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":219,"url":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol","url_meta":{"origin":1299,"position":4},"title":"Introduction to BGP Protocol","author":"sajith achipra","date":"July 17, 2024","format":false,"excerpt":"Introduction to BGP \u2013 The Backbone of Internet Routing In this tutorial, we\u2019ll go over the basics of BGP (Border Gateway Protocol) and what makes it different from other routing protocols. If you're just getting started with routing or trying to understand how large networks communicate over the internet, this\u2026","rel":"","context":"In &quot;bgp&quot;","block_context":{"text":"bgp","link":"https:\/\/www.zframez.com\/articles\/category\/routing\/bgp"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":1221,"url":"https:\/\/www.zframez.com\/articles\/networking-fundamentals\/networking-terminologies-a-beginners-guide-part-1","url_meta":{"origin":1299,"position":5},"title":"Networking Terminologies \u2013 A Beginner\u2019s Guide Part 1","author":"sajith achipra","date":"July 29, 2025","format":false,"excerpt":"Understanding how computer networks work starts with learning a few essential terms. This post introduces some of the core networking concepts in a simple and practical way. If you're just getting started with networking or brushing up on the basics, this will give you a solid foundation to build on.\u2026","rel":"","context":"In &quot;Networking Fundamentals&quot;","block_context":{"text":"Networking Fundamentals","link":"https:\/\/www.zframez.com\/articles\/category\/networking-fundamentals"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/07\/OSI-vs-TCP-IP-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/07\/OSI-vs-TCP-IP-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/07\/OSI-vs-TCP-IP-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/07\/OSI-vs-TCP-IP-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/posts\/1299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/comments?post=1299"}],"version-history":[{"count":1,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/posts\/1299\/revisions"}],"predecessor-version":[{"id":1304,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/posts\/1299\/revisions\/1304"}],"wp:attachment":[{"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/media?parent=1299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/categories?post=1299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/tags?post=1299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}