{"id":38,"date":"2024-09-11T10:25:24","date_gmt":"2024-09-11T15:25:24","guid":{"rendered":"https:\/\/danielbondurantcybersecurityportfolio.online\/?p=38"},"modified":"2024-11-07T10:03:10","modified_gmt":"2024-11-07T16:03:10","slug":"capturing-a-clear-text-password-with-wireshark","status":"publish","type":"post","link":"https:\/\/danielbondurantcybersecurityportfolio.online\/?p=38","title":{"rendered":"Capturing a Clear Text Password with Wireshark"},"content":{"rendered":"\n<p>In this post, I will demonstrate analyzing packets with Wireshark to capture a password in clear text.<\/p>\n\n\n\n<p>Before Wireshark can be used, we need to capture some packets with the &#8216;Tcpdump&#8217; command and write them to a .pcap file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ tcpdump -i &#91;web interface] -w &#91;file name].pcap<\/code><\/pre>\n\n\n\n<p>The web interface can be identified with the ifconfig command.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"167\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXcBzInWu5O6JrIXNWtil2H-xSW-dySJmBuvOdKE2stbdFiLr_v0NM37WHpNxjmsawtB3fb3E-Wxa8dHcagLpCEZakovBiy3_FYR-94C6_KpoUNZ3DzlIsEWeijZwkX31g1uJBG-s8mTUJ-swBKaNxHzk3GM?key=BsDlT-zXwi9mWt1YKEEHWA\"><\/p>\n\n\n\n<p>My interface is br0.  Now we can enter this into the Tcpdump command along with a file name, I will name the file pwnet.pcap:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"391\" height=\"37\" src=\"https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-9.png\" alt=\"\" class=\"wp-image-83\" style=\"width:518px;height:auto\" srcset=\"https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-9.png 391w, https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-9-300x28.png 300w\" sizes=\"auto, (max-width: 391px) 100vw, 391px\" \/><\/figure>\n\n\n\n<p>Once I start this command, Tcpdump will capture all of the packets being sent back and forth on the br0 interface. Note that the IPv4 address is 10.0.0.19.<\/p>\n\n\n\n<p>Now that Tcpdump is running, I will open an intentionally unencrypted WordPress page and attempt to login.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"803\" height=\"532\" src=\"https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image.png\" alt=\"\" class=\"wp-image-44\" style=\"width:617px;height:auto\" srcset=\"https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image.png 803w, https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-300x199.png 300w, https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-768x509.png 768w\" sizes=\"auto, (max-width: 803px) 100vw, 803px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>With username &#8216;admin&#8217; I attempted two passwords; &#8216;newpassword&#8217; and &#8216;oldpassword&#8217;. Both login attempts failed, but that is fine for this exercise.<\/p>\n\n\n\n<p>We go back to the CLI and end the packet capture with ctrl+c:<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"96\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXd3Osuc4f-jBuAnTDQa7lT2VzkpRsmYx7hgMNvs3j4bDwuJdMNaZRoJLfI2oxaT8y4ixnfeE9DNiIzeyGivnoGh2yhLdSrvvLrpDtsiHfpV9TqqXkhhRwy7fB5Q3aZVqGvUcbztZIWi31PntsrEfiiCX8PA?key=BsDlT-zXwi9mWt1YKEEHWA\"><\/p>\n\n\n\n<p>Now that we have a pcap file, we can open it up in Wireshark:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"397\" height=\"45\" src=\"https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-10.png\" alt=\"\" class=\"wp-image-84\" style=\"width:485px;height:auto\" srcset=\"https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-10.png 397w, https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-10-300x34.png 300w\" sizes=\"auto, (max-width: 397px) 100vw, 397px\" \/><\/figure>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"383\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXcaagwrcc9wVgNhcjJkDzG9hY67XRuaVS9T97tS3pHyBOc6uJG5Nk0T84TVEHEjdwCZcwM8v2VU_QeDxOUJVqMPgej8l1MTjrptQJAjLQ8femmOcaGljwYYgfc2URyWx6SevP7WeWWmyyiv0VCQ1V9uMf9p?key=BsDlT-zXwi9mWt1YKEEHWA\"><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>The first task is to go to the Statistics tab, IPv4 Statistics, and All Addresses<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"771\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXewV5lsXT_UyPgLjrL5xdVomW5Jgrz80T77T099ZaGkz19St60ymwfwlsmPHTvsSqFRQREGqyZvTXZMxZfCnlmU_Nh7NupzMHXYhoPDwjySWMNgL7SxegI0Cu51ubNMgxPO097GQBqgkmyoVG7c1WtuSJy-?key=BsDlT-zXwi9mWt1YKEEHWA\"><\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"197\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfgKDA_NWC5sisTSuyPShVYhaq9Alu1wN3geI4afQOboWbtsIfyltQZrjwSnd5Cqat8DS7KTcTjSqwPj3q5c3DMBUCTS2XkfGqqHq8pFN4J31FcRAZkLCeE2VYOtlR9h5MCOdkP6Idqo575hEN_OLeYwPTu?key=BsDlT-zXwi9mWt1YKEEHWA\"><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>This gives us a list of IPv4 addresses that were seen and had packets captured. Two things stand out here:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We see that two of the addresses have much higher packet counts than the rest<\/li>\n\n\n\n<li>One of them is my interface IP, 10.0.0.19<\/li>\n<\/ul>\n\n\n\n<p>This means the 178.128.237.187 address is most likely associated with the unencrypted site that we tried to log into. We will start with that assumption to move forward locating the login attempt.<\/p>\n\n\n\n<p>With this info in mind, we next go to the Statistics, Conversations tab:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXehw1XDalH6VQfAIZZhXPi0Mmegnz8LNNVm2zB5Fsxl3o7thXsHeMAQA9tvCNHHGlC8JTXG3l9RIikksKBMIWiDc584NnaH7jphTPofuY_irpaYVBIlydPG_o7l_-fAv-I8zvELwNtSAS5VsrnGHQcnNLg?key=BsDlT-zXwi9mWt1YKEEHWA\" width=\"427\" height=\"162\"><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Moving to the IPv4 tab we see again the number of packets between 10.0.0.19 and 178.128.237.187, bolstering our previous assumption.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"140\" src=\"https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-11-1024x140.png\" alt=\"\" class=\"wp-image-85\" style=\"width:688px;height:auto\" srcset=\"https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-11-1024x140.png 1024w, https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-11-300x41.png 300w, https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-11-768x105.png 768w, https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-11.png 1261w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Right click on that row, Apply as Filter, Selected, and A&lt;-&gt;B. This will filter communication both ways between these addresses.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXd21_Qse-7e0Mq4thaaN98EVHMq0VongRohAFOk5jpfPlLvcJuk7Em1cbkAdhjlBSJikzjRV85pLYmCZjFeQhqNStEGzIVtodz_LCHUwQbBa5-dUkEMF5bAyixZR4uydgi5fMPpJ8EKOs1vTUb0-SFAnSo?key=BsDlT-zXwi9mWt1YKEEHWA\" width=\"624\" height=\"237\"><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Here are the filtered packets:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXeW_x48eJS0P3XOfBZCCQ28rR7aHDY18GzorcTKzZqQKm7WmZEalGcRRq7InyJOAkRzFuLvhLvaYafmN9PTs09tZBoLYg3B-b75IkQHjMti5r7XtLE_0dzEqMdi2ibTpyN6zu2VzEW8B4yIUFWUUZHqJcl7?key=BsDlT-zXwi9mWt1YKEEHWA\" width=\"624\" height=\"179\"><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>There are still a lot of packets to have to manually look through, so we can filter further by entering into the search bar [tcp contains &#8220;login&#8221;] to see if that will help narrow down the search.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"224\" src=\"https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-12-1024x224.png\" alt=\"\" class=\"wp-image-86\" style=\"width:677px;height:auto\" srcset=\"https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-12-1024x224.png 1024w, https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-12-300x66.png 300w, https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-12-768x168.png 768w, https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-12.png 1185w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Only a handful of packets to look through now. Instead of looking at every packet, I notice that the two packets at the bottom are the only packets with POST in the info column. This could correspond with the two login attempts I made, so I will start with the first of those.<\/p>\n\n\n\n<p>Right click that row, Follow, TCP Stream.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdKdRm0exGOjyd57ciJkboNiev6qWQmhBDSSqX14rz7kY_FqowjuvOo2EeVIO2WgWbfbr2-EO3mU29ECZhnN2WqqpqsrmpYq2QgPHgWF199FPXCCcYfcq4DAwtE-JFRHxyfZjqF2RJgyYjCcF_MF9BIwroo?key=BsDlT-zXwi9mWt1YKEEHWA\" width=\"624\" height=\"435\"><\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Now we have a readable text output.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXcOq6K449LwEUDziSWZkZud9qM8Xw3XSIL5i7l8tuVzX0kF2O4IadaNNXELGU3lTnvstY1RlC3PKBJp-_x3r2htdc9wwgllc4qrIpDlvE-Y8roFpQeu5vLjuslq2IuwCIdEC-y5kR0P3XudXEuBGhwP8VU?key=BsDlT-zXwi9mWt1YKEEHWA\" width=\"624\" height=\"373\"><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>After looking through for a bit, we can see the last red text line has the following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"256\" height=\"22\" src=\"https:\/\/danielbondurantcybersecurityportfolio.online\/wp-content\/uploads\/2024\/09\/image-13.png\" alt=\"\" class=\"wp-image-87\" style=\"width:340px;height:auto\"\/><\/figure>\n\n\n\n<p>We have found the login attempt. &#8216;admin&#8217; is the same username, and &#8216;newpassword&#8217; was the first password I tried.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, I will demonstrate analyzing packets with Wireshark to capture a password in clear text. Before Wireshark can be used, we need to capture some packets with the &#8216;Tcpdump&#8217; command and write them to a .pcap file: The web interface can be identified with the ifconfig command. My interface is br0. Now we [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"[]"},"categories":[6,8],"tags":[],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-linux","category-wireshark"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/danielbondurantcybersecurityportfolio.online\/index.php?rest_route=\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/danielbondurantcybersecurityportfolio.online\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/danielbondurantcybersecurityportfolio.online\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/danielbondurantcybersecurityportfolio.online\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/danielbondurantcybersecurityportfolio.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=38"}],"version-history":[{"count":6,"href":"https:\/\/danielbondurantcybersecurityportfolio.online\/index.php?rest_route=\/wp\/v2\/posts\/38\/revisions"}],"predecessor-version":[{"id":141,"href":"https:\/\/danielbondurantcybersecurityportfolio.online\/index.php?rest_route=\/wp\/v2\/posts\/38\/revisions\/141"}],"wp:attachment":[{"href":"https:\/\/danielbondurantcybersecurityportfolio.online\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/danielbondurantcybersecurityportfolio.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/danielbondurantcybersecurityportfolio.online\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}