{"id":231,"date":"2012-10-01T00:51:13","date_gmt":"2012-10-01T00:51:13","guid":{"rendered":"http:\/\/www.gironsec.com\/blog\/?p=231"},"modified":"2014-07-31T22:46:05","modified_gmt":"2014-07-31T22:46:05","slug":"tenable-nessus-appsec-interview-spoilers","status":"publish","type":"post","link":"https:\/\/www.gironsec.com\/blog\/2012\/10\/tenable-nessus-appsec-interview-spoilers\/","title":{"rendered":"Tenable Nessus Appsec Interview Spoilers"},"content":{"rendered":"<p>Hello everyone,<\/p>\n<p>Today we will be going over the answers to the test offered by Tenable \/ Nessus when you interview with them to be an appsec guy. I was told I was the first to ace all 3 tests, so I might as well be the first to spoil all 3 tests.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/outta-my-way.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/outta-my-way.jpg\" alt=\"\" title=\"outta my way\" width=\"500\" height=\"344\" class=\"alignnone size-full wp-image-239\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/outta-my-way.jpg 500w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/outta-my-way-300x206.jpg 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>What they want is a hash which is provided at the end of the test. It&#8217;s 01b689a06ed6be8c01434eb92101d092<\/p>\n<p>Of course you can&#8217;t just hand em the hash, you should tell them how you solved the challenges. Here is how:<\/p>\n<p>Question 1)<br \/>\nSolved by a nullbyte after index.php ie: http:\/\/restest.tenable.com\/?f=index.php%00<br \/>\nlook at blank source for this:<br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #557799\">&lt;?php<\/span>\r\n<span style=\"color: #888888\">\/*<\/span>\r\n<span style=\"color: #888888\"> * Great, you made it! That&#39;s already one challenge you knocked out ;)<\/span>\r\n<span style=\"color: #888888\"> *<\/span>\r\n<span style=\"color: #888888\"> * Please go to http:\/\/restest.tenable.com\/497c189133bcdd0f24bd11710e630420.html for the next<\/span>\r\n<span style=\"color: #888888\"> * one!<\/span>\r\n<span style=\"color: #888888\"> *<\/span>\r\n<span style=\"color: #888888\"> *\/<\/span>\r\n\r\n<span style=\"color: #996633\">$file<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"color: #996633\">$_REQUEST<\/span>[<span style=\"background-color: #fff0f0\">&quot;f&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">if<\/span> ( <span style=\"color: #333333\">!<\/span><span style=\"color: #007020\">isset<\/span>(<span style=\"color: #996633\">$file<\/span>) )\r\n{\r\n header(<span style=\"background-color: #fff0f0\">&quot;Location: http:\/\/restest.tenable.com\/?f=main&quot;<\/span>);\r\n <span style=\"color: #008800; font-weight: bold\">exit<\/span>(<span style=\"color: #0000DD; font-weight: bold\">0<\/span>);\r\n}\r\n\r\n<span style=\"color: #996633\">$file<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"color: #996633\">$file<\/span> <span style=\"color: #333333\">.<\/span> <span style=\"background-color: #fff0f0\">&quot;.txt&quot;<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">if<\/span> ( strstr(<span style=\"color: #996633\">$file<\/span>, <span style=\"background-color: #fff0f0\">&quot;\/&quot;<\/span>) )\r\n{\r\n <span style=\"color: #996633\">$buf<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;Invalid character in file name&quot;<\/span>;\r\n}\r\n<span style=\"color: #008800; font-weight: bold\">else<\/span> <span style=\"color: #008800; font-weight: bold\">if<\/span> ( <span style=\"color: #007020\">file_exists<\/span>(<span style=\"color: #996633\">$file<\/span>) )\r\n{\r\n <span style=\"color: #996633\">$buf<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">file_get_contents<\/span>(<span style=\"color: #996633\">$file<\/span>);\r\n}\r\n<span style=\"color: #008800; font-weight: bold\">else<\/span> <span style=\"color: #996633\">$buf<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;File not found&quot;<\/span>;\r\n\r\n<span style=\"color: #008800; font-weight: bold\">echo<\/span> <span style=\"color: #996633\">$buf<\/span>;\r\n<span style=\"color: #557799\">?&gt;<\/span>\r\n<\/pre>\n<\/div>\n<p>Question 2)<br \/>\nThe second one is an archive file, but I wasn&#8217;t sure which. Inspecting the header and comparing it (see attachments) showed the header off by about 20 bytes, so a correction with a hex editor made the file right.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/compare4me2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/compare4me2.png\" alt=\"\" title=\"compare4me2\" width=\"639\" height=\"469\" class=\"alignnone size-full wp-image-232\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/compare4me2.png 639w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/compare4me2-300x220.png 300w\" sizes=\"(max-width: 639px) 100vw, 639px\" \/><\/a><\/p>\n<p>Not quite an ELF file, but you can see the comparison here:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/compare4me.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/compare4me-300x212.png\" alt=\"\" title=\"compare4me\" width=\"300\" height=\"212\" class=\"alignnone size-medium wp-image-233\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/compare4me-300x212.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/compare4me-1024x726.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/compare4me.png 1350w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The server is essentially looking for a string by doing a string comparison (typical of the repe cmpsb \/ setnbe instrctions). It loops for the characters &#8216;bind&#8217; referenced inside read-only data at 0x08048877<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048707<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">mov<\/span>     <span style=\"color: #333399; font-weight: bold\">dword<\/span> <span style=\"color: #996633\">ptr<\/span> [<span style=\"color: #007020\">ebp<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #005588; font-weight: bold\">454h<\/span>], <span style=\"color: #996633\">offset<\/span> <span style=\"color: #0000DD; font-weight: bold\">08048877<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048711<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">mov<\/span>     <span style=\"color: #333399; font-weight: bold\">dword<\/span> <span style=\"color: #996633\">ptr<\/span> [<span style=\"color: #007020\">ebp<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #005588; font-weight: bold\">458h<\/span>], <span style=\"color: #0000DD; font-weight: bold\">4<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">0804871<\/span><span style=\"color: #0066BB; font-weight: bold\">B<\/span>                 <span style=\"color: #007020\">cl<\/span><span style=\"color: #996633\">d<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">0804871<\/span><span style=\"color: #0066BB; font-weight: bold\">C<\/span>                 <span style=\"color: #996633\">mov<\/span>     <span style=\"color: #007020\">esi<\/span>, [<span style=\"color: #007020\">ebp<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #005588; font-weight: bold\">450h<\/span>]\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048722<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">mov<\/span>     <span style=\"color: #007020\">edi<\/span>, [<span style=\"color: #007020\">ebp<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #005588; font-weight: bold\">454h<\/span>]\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048728<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">mov<\/span>     <span style=\"color: #007020\">ecx<\/span>, [<span style=\"color: #007020\">ebp<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #005588; font-weight: bold\">458h<\/span>]\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">0804872<\/span><span style=\"color: #0066BB; font-weight: bold\">E<\/span>                 <span style=\"color: #996633\">repe<\/span> <span style=\"color: #996633\">cmpsb<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048730<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">setnbe<\/span>  <span style=\"color: #007020\">dl<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048733<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">setb<\/span>    <span style=\"color: #007020\">al<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048736<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">mov<\/span>     <span style=\"color: #007020\">ecx<\/span>, <span style=\"color: #007020\">edx<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048738<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">sub<\/span>     <span style=\"color: #007020\">cl<\/span>, <span style=\"color: #007020\">al<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">0804873<\/span><span style=\"color: #0066BB; font-weight: bold\">A<\/span>                 <span style=\"color: #996633\">mov<\/span>     <span style=\"color: #007020\">eax<\/span>, <span style=\"color: #007020\">ecx<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">0804873<\/span><span style=\"color: #0066BB; font-weight: bold\">C<\/span>                 <span style=\"color: #996633\">movsx<\/span>   <span style=\"color: #007020\">eax<\/span>, <span style=\"color: #007020\">al<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">0804873<\/span><span style=\"color: #0066BB; font-weight: bold\">F<\/span>                 <span style=\"color: #996633\">test<\/span>    <span style=\"color: #007020\">eax<\/span>, <span style=\"color: #007020\">eax<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048741<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">jnz<\/span>     <span style=\"color: #996633\">short<\/span> <span style=\"color: #996633\">loc_8048766<\/span>\r\n<\/pre>\n<\/div>\n<p>By entering &#8220;bind&#8221; after telnet-ing to the the service \/ port, I got the answer for the next part as shown in the next attachment.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/part-2-done.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/part-2-done.png\" alt=\"\" title=\"part 2 done\" width=\"675\" height=\"424\" class=\"alignnone size-full wp-image-234\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/part-2-done.png 675w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/part-2-done-300x188.png 300w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><\/a><\/p>\n<p>Question 3)<\/p>\n<p>Right after the recv call (function that accepts our data) there is a byte comparison checking the length of our input. if its greater than 7, then continue, otherwise the program quits:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/part3_2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/part3_2.png\" alt=\"\" title=\"part3_2\" width=\"675\" height=\"900\" class=\"alignnone size-full wp-image-235\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/part3_2.png 675w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/part3_2-225x300.png 225w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><\/a><br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048718<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">call<\/span>    <span style=\"color: #996633\">_recv<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">0804871<\/span><span style=\"color: #0066BB; font-weight: bold\">D<\/span>                 <span style=\"color: #996633\">mov<\/span>     [<span style=\"color: #007020\">ebp<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">8<\/span>], <span style=\"color: #007020\">eax<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048720<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">mov<\/span>     <span style=\"color: #007020\">eax<\/span>, [<span style=\"color: #007020\">ebp<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">8<\/span>]\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048723<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">cmp<\/span>     <span style=\"color: #007020\">eax<\/span>, <span style=\"color: #0000DD; font-weight: bold\">7<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048726<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">ja<\/span>      <span style=\"color: #996633\">short<\/span> <span style=\"color: #996633\">loc_8048734<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048728<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">mov<\/span>     <span style=\"color: #333399; font-weight: bold\">dword<\/span> <span style=\"color: #996633\">ptr<\/span> [<span style=\"color: #007020\">esp<\/span>], <span style=\"color: #0000DD; font-weight: bold\">0<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">0804872<\/span><span style=\"color: #0066BB; font-weight: bold\">F<\/span>                 <span style=\"color: #996633\">call<\/span>    <span style=\"color: #996633\">_exit<\/span>\r\n<\/pre>\n<\/div>\n<p>So after passing that I noticed the value sent from the recv() call was being stored into the EAX register, and then doing a numerical \/ binary comparison against the value stored inside, specifically checking if the value of EAX is equal to 1024 in hex (4132 in decimal):<br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048734<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">mov<\/span>     <span style=\"color: #007020\">eax<\/span>, [<span style=\"color: #007020\">ebp<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #005588; font-weight: bold\">40h<\/span>]\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048737<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">mov<\/span>     [<span style=\"color: #007020\">esp<\/span>], <span style=\"color: #007020\">eax<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">0804873<\/span><span style=\"color: #0066BB; font-weight: bold\">A<\/span>                 <span style=\"color: #996633\">call<\/span>    <span style=\"color: #996633\">_ntohl<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">0804873<\/span><span style=\"color: #0066BB; font-weight: bold\">F<\/span>                 <span style=\"color: #996633\">mov<\/span>     [<span style=\"color: #007020\">ebp<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #005588; font-weight: bold\">40h<\/span>], <span style=\"color: #007020\">eax<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048742<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">mov<\/span>     <span style=\"color: #007020\">eax<\/span>, [<span style=\"color: #007020\">ebp<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #005588; font-weight: bold\">3Ch<\/span>]\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048745<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">mov<\/span>     [<span style=\"color: #007020\">esp<\/span>], <span style=\"color: #007020\">eax<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048748<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">call<\/span>    <span style=\"color: #996633\">_ntohl<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">0804874<\/span><span style=\"color: #0066BB; font-weight: bold\">D<\/span>                 <span style=\"color: #996633\">mov<\/span>     [<span style=\"color: #007020\">ebp<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #005588; font-weight: bold\">3Ch<\/span>], <span style=\"color: #007020\">eax<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048750<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">mov<\/span>     <span style=\"color: #007020\">eax<\/span>, [<span style=\"color: #007020\">ebp<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #005588; font-weight: bold\">3Ch<\/span>]\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048753<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">cmp<\/span>     <span style=\"color: #007020\">eax<\/span>, <span style=\"color: #005588; font-weight: bold\">1024h<\/span>\r\n<span style=\"color: #997700; font-weight: bold\">.text:<\/span><span style=\"color: #FF0000; background-color: #FFAAAA\">08048758<\/span>                 <span style=\"color: #0066BB; font-weight: bold\">jnz<\/span>     <span style=\"color: #996633\">short<\/span> <span style=\"color: #996633\">loc_804877F<\/span>\r\n<\/pre>\n<\/div>\n<p>So all I had to do was stick the value 1024 in hex into the recv call. The problem is it wants something 8 bytes in length, but 1024 is only 2 bytes. I solved this by passing the data with NULL values 0x00 in hex.<br \/>\nI used php to do this:<br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #557799\">&lt;?php<\/span>\r\n<span style=\"color: #996633\">$host<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;restest.tenable.com&quot;<\/span>;\r\n<span style=\"color: #996633\">$port<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">31338<\/span>;\r\n<span style=\"color: #996633\">$timeout<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">20<\/span>;\r\n<span style=\"color: #996633\">$data<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\x24<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n<span style=\"color: #996633\">$fp<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">fsockopen<\/span>(<span style=\"color: #996633\">$host<\/span>,<span style=\"color: #996633\">$port<\/span>,<span style=\"color: #996633\">$errno<\/span>,<span style=\"color: #996633\">$errstr<\/span>,<span style=\"color: #996633\">$timeout<\/span>);\r\n<span style=\"color: #008800; font-weight: bold\">if<\/span> (<span style=\"color: #333333\">!<\/span><span style=\"color: #996633\">$fp<\/span>)\r\n{\r\n    <span style=\"color: #008800; font-weight: bold\">die<\/span>(<span style=\"background-color: #fff0f0\">&quot;<\/span><span style=\"background-color: #eeeeee\">$errstr<\/span><span style=\"background-color: #fff0f0\"> (<\/span><span style=\"background-color: #eeeeee\">$errno<\/span><span style=\"background-color: #fff0f0\">)<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>);\r\n\r\n} <span style=\"color: #008800; font-weight: bold\">else<\/span>\r\n{\r\n    <span style=\"color: #007020\">fwrite<\/span>(<span style=\"color: #996633\">$fp<\/span>,<span style=\"color: #996633\">$data<\/span>);\r\n\r\n    <span style=\"color: #008800; font-weight: bold\">while<\/span>(<span style=\"color: #333333\">!<\/span><span style=\"color: #007020\">feof<\/span>(<span style=\"color: #996633\">$fp<\/span>))\r\n        {\r\n        <span style=\"color: #008800; font-weight: bold\">echo<\/span> <span style=\"color: #007020\">fgets<\/span>(<span style=\"color: #996633\">$fp<\/span>, <span style=\"color: #0000DD; font-weight: bold\">512<\/span>);\r\n        }\r\n        <span style=\"color: #007020\">fclose<\/span>(<span style=\"color: #996633\">$fp<\/span>);\r\n}\r\n<span style=\"color: #557799\">?&gt;<\/span>\r\n<\/pre>\n<\/div>\n<p>And here it is working:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/part3_21.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/part3_21.png\" alt=\"\" title=\"part3_2\" width=\"675\" height=\"900\" class=\"alignnone size-full wp-image-236\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/part3_21.png 675w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/part3_21-225x300.png 225w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><\/a><\/p>\n<p>Just copy this verbatim and you too can have a crack at Tenable \/ Nessus, well at least until they find this and change the answers. Be warned though, they don&#8217;t want smart people, they want clay to mold. <\/p>\n<p>Good luck and happy hacking =)<\/p>\n<p>And no, I didn&#8217;t forget the funny image.<\/p>\n<p><a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/1209917660610.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2012\/10\/1209917660610.jpg\" alt=\"\" title=\"1209917660610\" width=\"536\" height=\"3159\" class=\"alignnone size-full wp-image-237\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello everyone, Today we will be going over the answers to the test offered by Tenable \/ Nessus when you interview with them to be an appsec guy. I was told I was the first to ace all 3 tests, so I might as well be the first to spoil all 3 tests. What they [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,5,6,7],"tags":[104,28,27,25,26],"_links":{"self":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/231"}],"collection":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/comments?post=231"}],"version-history":[{"count":4,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/231\/revisions"}],"predecessor-version":[{"id":866,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/231\/revisions\/866"}],"wp:attachment":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/media?parent=231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/categories?post=231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/tags?post=231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}