{"id":266,"date":"2014-12-17T00:06:26","date_gmt":"2014-12-17T00:06:26","guid":{"rendered":"http:\/\/scottyrotten.wordpress.com\/?p=266"},"modified":"2022-06-03T05:40:41","modified_gmt":"2022-06-03T05:40:41","slug":"overthewire-bandit-1","status":"publish","type":"post","link":"https:\/\/hackmethod.com\/overthewire-bandit-1\/","title":{"rendered":"OvertheWire &#8211; Bandit 1"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; _builder_version=&#8221;3.22&#8243;][et_pb_row _builder_version=&#8221;4.7.4&#8243; _module_preset=&#8221;default&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.7.4&#8243; _module_preset=&#8221;default&#8221;][et_pb_text _builder_version=&#8221;4.7.4&#8243; _module_preset=&#8221;default&#8221;]<\/p>\n<div class=\"et_pb_column et_pb_column_4_4 et_pb_column_0  et_pb_css_mix_blend_mode_passthrough et-last-child\">\n<div class=\"et_pb_module et_pb_text et_pb_text_0  et_pb_text_align_left et_pb_bg_layout_light\"><strong>Recap of Level 0:<\/strong><span style=\"font-size: medium; color: #333333;\"><\/span> <span style=\"color: #404040;\">We logged into the overthewire Bandit 0 level using SSH and are now presented with a prompt.<\/span><\/div>\n<div class=\"et_pb_module et_pb_text et_pb_text_0  et_pb_text_align_left et_pb_bg_layout_light\">\u00a0<\/p>\n<div class=\"et_pb_text_inner\"><\/div>\n<div class=\"et_pb_text_inner\"><\/div>\n<div class=\"et_pb_text_inner\"><\/div>\n<div class=\"et_pb_text_inner\"><\/div>\n<div class=\"et_pb_text_inner\"><\/div>\n<div class=\"et_pb_text_inner\"><\/div>\n<div class=\"et_pb_text_inner\"><\/div>\n<div class=\"et_pb_text_inner\"><\/div>\n<div class=\"et_pb_text_inner\"><\/div>\n<div class=\"et_pb_text_inner\"><\/div>\n<div class=\"et_pb_text_inner\"><\/div>\n<div class=\"et_pb_text_inner\"><\/div>\n<div class=\"et_pb_text_inner\"><a title=\"Bandit Level 1\" href=\"http:\/\/overthewire.org\/wargames\/bandit\/bandit1.html\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Bandit Level\u00a01<\/strong><\/a><\/div>\n<\/div>\n<\/div>\n<h4><strong><\/strong><\/h4>\n<h4><strong><\/strong><\/h4>\n<h4><strong><br \/>Objective: <\/strong><\/h4>\n<p>Find the password to the next level<\/p>\n<h4><strong>Intel Given:<\/strong><\/h4>\n<ul>\n<li>Password is in a file named &#8216;readme&#8217;<\/li>\n<li>&#8216;readme&#8217; is in the home directory<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<h4><strong>How to: <\/strong><\/h4>\n<p>Lets observe a few things first. When SSHing into a new machine you always want to know what type of system you&#8217;re logged into, who you are logged in as, and what directory you&#8217;re in.<\/p>\n<p>First, notice that when we logged in with SSH we were presented with a prompt. This type of prompt is typical of a *nix (Linux or Unix) type operating system. To validate this you can enter the command &#8216;uname -a&#8217; and you will be presented with some information about the operating system that is currently running.<\/p>\n<p>Note: At any time you see a command and wish to know more about the commands or &#8220;switches&#8221; that can be used with it you can access the manual on any *nix system by typing the command &#8216;man &lt;command&gt;&#8217; for example &#8216;man uname&#8217;.<\/p>\n<p>So great, we have discovered we are operating on a Linux machine. Now we want to who we are, and where we currently are at in our file system. There are two simple ways to do this. First, you can type &#8216;whoami&#8217; and &#8216;pwd&#8217;, this will give you the current user you are logged into as well as printing your working directory. The other way is to look to the left of your prompt. Notice you have [bandit0@melinda:~] this is essentially saying user: bandit0 is current on machine melinda\u00a0and is at home\/bandit0. ~ is shorthand in Linux for the current users &#8216;home&#8217; directory.<\/p>\n<p>Now that we know we&#8217;re in the home directory, and according to our intel the filename we need is here, lets look whats in the directory. Enter &#8216;ls -al&#8217; into your command prompt, again I urge you to read the manual pages for each command I give. Notice we have a file named &#8220;readme&#8221;, now we simply read this filename to find the password. Enter &#8216;cat readme&#8217;. Congrats! You now have the password to enter Level 1.<\/p>\n<p>Terminate your SSH session by typing &#8216;exit&#8217; and reconnect to the bandit game using your new username and password!.<\/p>\n<h4><strong>Conclusion:<\/strong><\/h4>\n<p>We covered a few commands, if you&#8217;re to new to *nix I recommend you read the man pages for each of them and become comfortable with their application. Also, if you don&#8217;t know what it is take this time to research what &#8220;tab completion&#8221; is as it is helpful for command line.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row column_structure=&#8221;1_2,1_2&#8243; _builder_version=&#8221;4.7.4&#8243; _module_preset=&#8221;default&#8221;][et_pb_column type=&#8221;1_2&#8243; _builder_version=&#8221;4.7.4&#8243; _module_preset=&#8221;default&#8221;][et_pb_image src=&#8221;https:\/\/hackmethod.com\/wp-content\/uploads\/2020\/12\/Previous.png&#8221; alt=&#8221;Previous Level&#8221; title_text=&#8221;Previous&#8221; url=&#8221;https:\/\/hackmethod.com\/overthewire-bandit-0&#8243; _builder_version=&#8221;4.7.4&#8243; _module_preset=&#8221;default&#8221;][\/et_pb_image][\/et_pb_column][et_pb_column type=&#8221;1_2&#8243; _builder_version=&#8221;4.7.4&#8243; _module_preset=&#8221;default&#8221;][et_pb_image src=&#8221;https:\/\/hackmethod.com\/wp-content\/uploads\/2020\/12\/Next.png&#8221; alt=&#8221;Next Level&#8221; title_text=&#8221;Next&#8221; url=&#8221;https:\/\/hackmethod.com\/overthewire-bandit-2&#8243; align=&#8221;right&#8221; _builder_version=&#8221;4.7.4&#8243; _module_preset=&#8221;default&#8221;][\/et_pb_image][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recap of Level 0: We logged into the overthewire Bandit 0 level using SSH and are now presented with a prompt. \u00a0 Bandit Level\u00a01 Objective: Find the password to the next level Intel Given: Password is in a file named &#8216;readme&#8217; &#8216;readme&#8217; is in the home directory How to: Lets observe a few things first. [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":1454,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"<strong><span style=\"color: #404040;\"><a href=\"https:\/\/www.hackmethod.com\/overthewire-org-overview-and-bandit-level-0-walkthrough\/\">Recap of Last\u00a0Lesson<\/a>:<\/span><\/strong><span style=\"color: #404040;\">\u00a0We logged into the overthewire Bandit 0 level using SSH and are now presented with a prompt.<\/span>\n\n<a title=\"Bandit Level 1\" href=\"http:\/\/overthewire.org\/wargames\/bandit\/bandit1.html\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Bandit Level\u00a01<\/strong><\/a>\n\n<h4><strong>Objective: <\/strong>Find the password to the next level<\/h4>\n\n<h4><strong>Intel Given:<\/strong><\/h4>\n\n<ul>\n    <li>Password is in a file named 'readme'<\/li>\n    <li>'readme' is in the home directory<\/li>\n<\/ul>\n\n<!--more-->\n\n<h4><strong>How to: <\/strong><\/h4>\n\nLets observe a few things first. When SSHing into a new machine you always want to know what type of system you're logged into, who you are logged in as, and what directory you're in.\n\nFirst, notice that when we logged in with SSH we were presented with a prompt. This type of prompt is typical of a *nix (Linux or Unix) type operating system. To validate this you can enter the command 'uname -a' and you will be presented with some information about the operating system that is currently running.\n\nNote: At any time you see a command and wish to know more about the commands or \"switches\" that can be used with it you can access the manual on any *nix system by typing the command 'man &lt;command&gt;' for example 'man uname'.\n\nSo great, we have discovered we are operating on a Linux machine. Now we want to who we are, and where we currently are at in our file system. There are two simple ways to do this. First, you can type 'whoami' and 'pwd', this will give you the current user you are logged into as well as printing your working directory. The other way is to look to the left of your prompt. Notice you have [bandit0@melinda:~] this is essentially saying user: bandit0 is current on machine melinda\u00a0and is at home\/bandit0. ~ is shorthand in Linux for the current users 'home' directory.\n\nNow that we know we're in the home directory, and according to our intel the filename we need is here, lets look whats in the directory. Enter 'ls -al' into your command prompt, again I urge you to read the manual pages for each command I give. Notice we have a file named \"readme\", now we simply read this filename to find the password. Enter 'cat readme'. Congrats! You now have the password to enter Level 1.\n\nTerminate your SSH session by typing 'exit' and reconnect to the bandit game using your new username and password!.\n\n<h4><strong>Conclusion:<\/strong><\/h4>\n\nWe covered a few commands, if you're to new to *nix I recommend you read the man pages for each of them and become comfortable with their application. Also, if you don't know what it is take this time to research what \"tab completion\" is as it is helpful for command line.","_et_gb_content_width":"1080","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[44,49],"tags":[43,45,46],"class_list":["post-266","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-overthewire","category-tutorials","tag-bandit","tag-overthewire","tag-tutorials"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/hackmethod.com\/wp-content\/uploads\/2015\/09\/bandit-mask-clip-art-cowboy-bandit-vector.jpg?fit=300%2C300&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5zY4D-4i","_links":{"self":[{"href":"https:\/\/hackmethod.com\/wp-json\/wp\/v2\/posts\/266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hackmethod.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hackmethod.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hackmethod.com\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/hackmethod.com\/wp-json\/wp\/v2\/comments?post=266"}],"version-history":[{"count":24,"href":"https:\/\/hackmethod.com\/wp-json\/wp\/v2\/posts\/266\/revisions"}],"predecessor-version":[{"id":27478,"href":"https:\/\/hackmethod.com\/wp-json\/wp\/v2\/posts\/266\/revisions\/27478"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hackmethod.com\/wp-json\/wp\/v2\/media\/1454"}],"wp:attachment":[{"href":"https:\/\/hackmethod.com\/wp-json\/wp\/v2\/media?parent=266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hackmethod.com\/wp-json\/wp\/v2\/categories?post=266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hackmethod.com\/wp-json\/wp\/v2\/tags?post=266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}