Free Penetration Testing Laboratory Test Lab 15 — Who Is the n0v1ch0k?

Pentestit
Pentestit
Mar 3 · 5 min read

On March 15, 2021, Pentestit launches Test lab 15, where IT specialists can test their skills in finding and exploiting vulnerabilities in the corporate network and web applications for free.

About Test lab

Test lab is a cyber training ground where participants gain experience in analyzing the security of information systems. Each such laboratory has an integral infrastructure, history and many hidden vulnerabilities that must be discovered, localized and exploited, and as a result — a full-fledged scenario for compromising the company’s network. An important feature of the Test lab is maximum realism. Participants acting as attackers, as they pass, gain access to individual nodes of the laboratory, each of which contains a token. The winner is the one who first collects all tokens and takes full control of the virtual corporate network. Anyone can try their hand and check their existing information security skills. Laboratories are always unique and contain the most relevant vulnerabilities.

What you need to test your skills and capabilities:

What is the essence of passing tasks

The main purpose of the laboratory is to acquire and consolidate the skills of searching and exploiting vulnerabilities both in manual mode and using special tools such as: Nmap, Tplmap, Dirbuster, Wapiti, BurpSuite / OWASP Zap, Metasploit Framework, Patator / Hydra, Enum4linux, IDE as well as tools for reverse engineering, network protocol analysis, etc.

By receiving tokens, you will be able to penetrate deeper into the test corporate network, where more and more servers will be available for attack. In the course of work, you will get acquainted with popular technologies, this will allow you to look at information security from the side of an attacker. It is worth remembering about your main tool — logical thinking and resourcefulness.

For an illustrative example, we propose to analyze several tasks of the past laboratories. The full walkthrough of Test lab 14 tasks is available at the link.

All information is presented for informational purposes only, do not violate the law.

Wiki

There is a search bar on the site page, where we enter the text and make sure that it is displayed on the page:

Assuming that a template engine is used, enter the data to define it:

{{7*7}}

The entered text is displayed on the page without changes, therefore, this is not Jinga or Twig. To save time, let’s use the Tplmap tool, which could not figure out which plugin is being used:

# ./tplmap.py -u http://127.0.0.1/?a=

With the help of WhatWeb, we found out that the site is written in Ruby-on-Rails: # whatweb 127.0.0.1

Let’s try to use the payload for the popular Ruby-on-Rails Haml templating engine: <%=7*7>

The page displayed 49, therefore, the plugin was found correctly. Then we compose a request that allows us to get a token:токен

Router

Having performed reconnaissance in the form of scanning TCP ports, no results were obtained. Trying to scan UDP. Found an open SNMP port (UDP 161). And using the Onesixtyone tool, we have community lines:

# onesixtyone -c /usr/share/john/password.lst 172.16.50.50

When we have the necessary data, using the Snmpwalk tool, we try to get information about the server:

# snmpwalk -c skywalker -v1 172.16.50.50

After analyzing the command output, we notice a strange system name, probably a token.

Java

Open the jar file as an archive and see that it consists of one class Main. Go to Main.class in the IDE:

After examining the decompiled code, we find information for connecting to SSH and displaying the result of the command:

df -h | grep /dev/sda1

Please note that the password is being changed. Add a few lines to the class to display the server IP address, login and password with which the connection is made.

Editing the class:

Compile the modified class and replace the original class in the jar file with it. Run the file:

The displayed password is a token.

Test lab statistics

More than 33,000 users from all over the world have already registered on the laboratory website. At the same time, a total of 664 participants completed the first task from the previous laboratory. At the same time, only 69 of them were able to compromise the IT structure of the virtual company completely.

About us

In addition to creating unique laboratories, we are the developers of Nemesida WAF, and also provide analysis services for the presence shortcomings (vulnerabilities) of corporate networks and web applications for the largest companies from Russia, USA, Great Britain, Czech Republic, Ukraine, Moldova, Azerbaijan, Kazakhstan, Canada; we train employees of large companies in the field of information security. If you want to understand in more detail how it all works, we offer training in the programs Zero Security: A (basic training) or Corporate laboratories (advanced training).

Conclusion

In the process of working in the Test lab, participants will study the nature of vulnerabilities, the main exploitation tools, countermeasures and the psychology of the attacker. By understanding how to build real attack vectors, you will learn how to effectively counter them. See you in the new Test lab 15!

Geek Culture

Proud to geek out.

Sign up for Geek Culture Hits

By Geek Culture

Subscribe to receive top 10 most read stories of Geek Culture — delivered straight into your inbox, once a week. Take a look.

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Pentestit

Written by

Pentestit

From Information Security With Love

Geek Culture

A new tech publication by Start it up (https://medium.com/swlh).

Pentestit

Written by

Pentestit

From Information Security With Love

Geek Culture

A new tech publication by Start it up (https://medium.com/swlh).

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store