{"id":240,"date":"2018-03-16T17:43:55","date_gmt":"2018-03-16T17:43:55","guid":{"rendered":"http:\/\/malwrforensics.com\/en\/?p=240"},"modified":"2018-03-16T19:44:29","modified_gmt":"2018-03-16T19:44:29","slug":"step-by-step-environment-setup-for-extreme-vulnerable-node-application-xvna-security-testing","status":"publish","type":"post","link":"https:\/\/malwrforensics.com\/en\/2018\/03\/16\/step-by-step-environment-setup-for-extreme-vulnerable-node-application-xvna-security-testing\/","title":{"rendered":"Step by step environment setup for Extreme Vulnerable Node Application (XVNA) security testing"},"content":{"rendered":"<p>Here is a detailed step by step tutorial on how to have everything ready if you want to test <a href=\"https:\/\/github.com\/vegabird\/xvna\">XVNA<\/a> (Extreme Vulnerable Node Application).<\/p>\n<p>Base OS: Ubuntu 16.04<\/p>\n<p>First, we need to install <strong>mongodb<\/strong>, <strong>nodejs<\/strong> and <strong>git<\/strong>:<\/p>\n<pre>apt-get install monodb\r\n\r\napt-get install nodejs\r\n\r\napt-get install git<\/pre>\n<p>We then clone the XVNA&#8217;s repository:<\/p>\n<pre>git clone\u00a0https:\/\/github.com\/vegabird\/xvna.git<\/pre>\n<p>Once everything is installed, we have to prepare a few things.<\/p>\n<p>First, we need to create the xvna database in mongodb. The syntax is <strong>use &lt;database name&gt;<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-241\" src=\"http:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_step1_mongo_create_db.png\" alt=\"\" width=\"465\" height=\"169\" srcset=\"https:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_step1_mongo_create_db.png 465w, https:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_step1_mongo_create_db-300x109.png 300w\" sizes=\"auto, (max-width: 465px) 100vw, 465px\" \/><\/p>\n<p>Second we need to import the json files from XVNA&#8217;s collection folder:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-242\" src=\"http:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_step2_import_collections.png\" alt=\"\" width=\"716\" height=\"22\" srcset=\"https:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_step2_import_collections.png 716w, https:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_step2_import_collections-300x9.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/p>\n<p>We need to import all the json files:<\/p>\n<pre>cd xvna\/collection\r\n\r\nmongoimport --db xvna --file .\/a5_insecure_dor.json --jsonArray\r\n\r\nmongoimport --db xvna --file .\/cart.json --jsonArray\r\n\r\nmongoimport --db xvna --file .\/login.json --jsonArray\r\n\r\nmongoimport --db xvna --file .\/users.json --jsonArray<\/pre>\n<p>And that should be it, now let&#8217;s do a quick check and see if the xvna database appears in mongo (if the import failed and database is empty, it won&#8217;t be listed).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-243\" src=\"http:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_step3_check_mongo_db.png\" alt=\"\" width=\"273\" height=\"107\" \/><\/p>\n<p>And let&#8217;s open the browser and see if the XVNA webpage shows up.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-244\" src=\"http:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_step4_check_login_page.png\" alt=\"\" width=\"533\" height=\"423\" srcset=\"https:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_step4_check_login_page.png 533w, https:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_step4_check_login_page-300x238.png 300w\" sizes=\"auto, (max-width: 533px) 100vw, 533px\" \/><\/p>\n<p>By default, the app will run on port 3000. If you want to change it to port 80, you&#8217;ll need to edit <em>index.js<\/em>.<\/p>\n<p>Search for <em>app.listen<\/em> and change the port from 3000 to 80. Here is how it should look:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-249\" src=\"http:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_set_listen_port_80.png\" alt=\"\" width=\"420\" height=\"92\" srcset=\"https:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_set_listen_port_80.png 420w, https:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_set_listen_port_80-300x66.png 300w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/p>\n<p>If you don&#8217;t know the default login details, check login.json (from the collections folder).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-246\" src=\"http:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_login_json.png\" alt=\"\" width=\"489\" height=\"108\" srcset=\"https:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_login_json.png 489w, https:\/\/malwrforensics.com\/en\/wp-content\/uploads\/2018\/03\/xvna_login_json-300x66.png 300w\" sizes=\"auto, (max-width: 489px) 100vw, 489px\" \/><\/p>\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a detailed step by step tutorial on how to have everything ready if you want to test XVNA (Extreme Vulnerable Node Application). Base OS: Ubuntu 16.04 First, we need to install mongodb, nodejs and git: apt-get install monodb apt-get install nodejs apt-get install git We then clone the XVNA&#8217;s repository: git clone\u00a0https:\/\/github.com\/vegabird\/xvna.git Once [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[71,11,69,70,68,15,67,66],"class_list":["post-240","post","type-post","status-publish","format-standard","hentry","category-security","tag-json","tag-linux","tag-mongo","tag-mongodb","tag-nodejs","tag-ubuntu","tag-vulnerable-node-application","tag-xvna"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[]}},"featured_image_urls_v2":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":""},"post_excerpt_stackable_v2":"<p>Here is a detailed step by step tutorial on how to have everything ready if you want to test XVNA (Extreme Vulnerable Node Application). Base OS: Ubuntu 16.04 First, we need to install mongodb, nodejs and git: apt-get install monodb apt-get install nodejs apt-get install git We then clone the XVNA&#8217;s repository: git clone\u00a0https:\/\/github.com\/vegabird\/xvna.git Once everything is installed, we have to prepare a few things. First, we need to create the xvna database in mongodb. The syntax is use &lt;database name&gt; Second we need to import the json files from XVNA&#8217;s collection folder: We need to import all the json&hellip;<\/p>\n","category_list_v2":"<a href=\"https:\/\/malwrforensics.com\/en\/category\/security\/\" rel=\"category tag\">Security<\/a>","author_info_v2":{"name":"malwrforensics","url":"https:\/\/malwrforensics.com\/en\/author\/u_malwrforensics\/"},"comments_num_v2":"0 comments","_links":{"self":[{"href":"https:\/\/malwrforensics.com\/en\/wp-json\/wp\/v2\/posts\/240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/malwrforensics.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/malwrforensics.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/malwrforensics.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/malwrforensics.com\/en\/wp-json\/wp\/v2\/comments?post=240"}],"version-history":[{"count":4,"href":"https:\/\/malwrforensics.com\/en\/wp-json\/wp\/v2\/posts\/240\/revisions"}],"predecessor-version":[{"id":250,"href":"https:\/\/malwrforensics.com\/en\/wp-json\/wp\/v2\/posts\/240\/revisions\/250"}],"wp:attachment":[{"href":"https:\/\/malwrforensics.com\/en\/wp-json\/wp\/v2\/media?parent=240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/malwrforensics.com\/en\/wp-json\/wp\/v2\/categories?post=240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/malwrforensics.com\/en\/wp-json\/wp\/v2\/tags?post=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}