Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Kali Linux CTF Blueprints
Kali Linux CTF Blueprints

Kali Linux CTF Blueprints: Build, test, and customize your own Capture the Flag challenges across multiple platforms designed to be attacked with Kali Linux

By Cameron Buchanan
$15.99 per month
Book Jul 2014 190 pages 1st Edition
eBook
$23.99 $15.99
Print
$39.99
Subscription
$15.99 Monthly
eBook
$23.99 $15.99
Print
$39.99
Subscription
$15.99 Monthly

What do you get with a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details


Publication date : Jul 24, 2014
Length 190 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781783985982
Category :

Estimated delivery fee Deliver to Chile

Premium 3 - 6 business days

$40.95
(Includes tracking information)

Standard 10 - 13 business days

$19.95
Table of content icon View table of contents Preview book icon Preview Book

Kali Linux CTF Blueprints

Chapter 1. Microsoft Environments

It makes sense to kick off this book with the most prevalent operating system in business. I'm sure the majority of penetration testers will agree that though both Linux and Windows have their benefits, the industry still falls heavily on Microsoft to provide the brunt of servers. Microsoft has provided testers with some of the most reliable vulnerabilities over the years, and I know that I'm always happy to see an MS reference whenever a scan completes.

By the end of the chapter, you should know at least three types of scenarios and have some idea about how to vary them for repeated tests. The chapter will aim to be as interactive as possible and follow-through as much as possible. In detail, we will cover the following topics:

  • The creation of basic vulnerable machines

  • A selection of suggestions for vulnerabilities to host

  • In-depth setup of a vulnerable Adobe ColdFusion installation

  • In-depth setup of a misconfigured MSSQL server

  • In-depth setup of TFTP

  • Flag setup and variations

  • Post-exploitation and pivot options

  • Exploitation guide for all three scenarios

Creating a vulnerable machine


The purpose of this book may seem counterintuitive to the majority of practices that security professionals carry out each day, but most core ideas to create a secure machine are the same as those to create a vulnerable machine.

Servers can be thought of as being created to serve a specific purpose—for example, to provide DNS services, host an Exchange environment, or manage a domain. This idea can be applied to the practice of hosting vulnerable services as well. The aim is to expose the server in one very particular way and secure it in every other aspect. You may treat them as authentication methods for the overthinking masochists of the world if you wish; that may help you envision the end result a little more clearly. To that end, the following tenets should be abided by:

  • Unless the scenario aims require it, ensure that any other services that you require to run on the system are fully patched and up to date.

  • Unless the scenario requires it, a proper antivirus solution with a firewall should be in place to secure other services.

  • Run the scenario on a separate network to any production or sensitive systems. This is quite simple to achieve by setting up a new network on a LAN connection without Internet access or through the use of virtual machines.

Securing a machine

Virtual or physical, your machine needs to be secure, and there's a simple process to achieve this. Build a fresh operating system. This is easy with a LiveCD when you have a spare Windows OS, but that's not always possible. At the time of this writing, TechNet provides 180-day accounts of the Windows operating system for testing purposes (technet.microsoft.com), which covers this style of usage. If you are using this book to kick off a future career in CTF building, consider getting a Microsoft Developer Network (MSDN) account, which will enable you to set up multiple environments for testing purposes.

Note

At this point, if you're aiming to host a vulnerable Windows product, don't perform the following step.

So, you have a fresh install—what now? Ensure everything is up to date. As you don't have anything other than the OS installed, you should just run Start | Search | Windows Update. Let it run, finish, and restart. Have a look through your build and remove any unnecessary programs that may have come with the install. You are now working with a clean slate. Wonderful.

Creating a secure network


I realize that some people who like to break stuff haven't had experience in building stuff. In my experience, it should be a longer-term goal for any dedicated tester to get involved in some network architecture design (at the very least), sit through some app or program development, and above all, get scripting. Those of you who have taken time out of your busy, stack-smashing schedule and learned network design can skip ahead. Those who haven't, strap yourself in, grab yourself a router, and prepare to have your mind gently rattled.

Basic requirements

A network needs some basic things to function:

  • A switch/hub

  • More than one networkable device

That's essentially your network right there. Technically speaking, you don't even need more than one device, but that setup would be a little pointless for our purposes.

If you are performing these tests for a single individual, be it yourself or someone you trust with the device you're building these vulnerable builds on, you can just host them on the device through the VM solution.

Setting up a Linux network

To set up networking on a Linux device, perform the following steps:

  1. Plug the device into the hub/switch.

  2. Open a terminal.

  3. Type ifconfig eth0 10.0.0.124 or whichever local subnet you wish to use.

  4. Congratulate yourself on a job well done.

Setting up a Windows network

To set up networking on a Windows device, perform the following steps:

  1. Plug the device into the router/hub/switch.

  2. Open a command line.

  3. Type netsh int ip set address "local area connection" static 10.0.0.2 255.255.255.0 10.0.0.255.

  4. Close all the screens.

  5. Congratulate yourself slightly more than the Linux user; they had it easy.

In order to test the connection, simply open a terminal on either device and ping the other host. For example, ping 10.0.0.2 should respond with a long stream of returns as any good ping should.

Hosting vulnerabilities


The choice of vulnerability to host is one of the more difficult parts when it comes to making challenges. If the vulnerability is too easy, the challengers will tear through it; however, if the vulnerability is too hard, the majority of the target audience are alienated. To resolve this, I've provided some suggestions of vulnerabilities to host, marked for difficulty of setup and difficulty of exploitation. For reference, the following descriptions of difficulties are provided:

  • The following are the various levels in difficulty of setup:

    • Simple – This level of difficulty requires installation of the affected software

    • Moderate – This level of difficulty requires installation of the affected software on a specific operating system

    • Complex – This level of difficulty requires installation and configuration of the affected software on, specific operating system

  • The following are the various levels in difficulty of exploitation:

    • Simple – This level of difficulty requires the use of out-of-the-box tools

    • Moderate – This level of difficulty requires configuration and the use of out-of-the-box tools or simple scripting to perform exploits

    • Complex – This level of difficulty requires the creation of complex scripts, else it is not supported by common exploitation tools

      Vulnerable package

      Difficulty of setup

      Difficulty of exploitation

      Adobe Flash Player

      Simple

      Moderate

      Oracle Java JRE

      Simple

      Moderate

      Internet Explorer

      Simple

      Complex

      QuickTime

      Moderate

      Complex

      ColdFusion

      Simple

      Simple

      TFTP

      Simple

      Simple

      MSSQL

      Simple

      Moderate

Scenario 1 – warming Adobe ColdFusion


Adobe ColdFusion is the Adobe framework for hosting web applications. It's available for a 30-day evaluation trial, is easy to set up, and creates remotely accessible web pages—perfect for our purposes.

Setup

First, take your freshly installed or sanitized Windows installation and download Adobe ColdFusion 9. There are newer versions available from adobe.com, but we will be working with version 9, which you can download from http://download.macromedia.com/pub/coldfusion/updates/901/ColdFusion_update_901_WWEJ_win64.exe. Now, perform the following steps:

  1. Run the .exe file to install the program, and use the defaults as you go along.

  2. Make sure you perform the following steps:

    1. Set Adobe ColdFusion 9 to host as a self-contained application as the following screenshot shows:

    2. Set the application to run a built-in server, as shown in the following screenshot:

    3. Set default credentials throughout as shown in the following screenshot, and make a note of them:

    4. Check the Enable RDS option as shown in the following screenshot:

  3. Go through with the final stages of the setup by logging on to the application through your browser. Make a note of the port that you're accessing it through; this will be the port that should be accessible remotely if the software is correctly set up.

  4. To test the installation, browse to the server. The default will be port 8500, so http://127.0.0.1:8500 should provide the installation directory, as the following screenshot shows:

Variations

There are a few vulnerabilities that can work here. First, the RDS login method can be attacked through a Metasploit module to gain an administrative login. This can be used to get a remote shell. Alternatively, default credentials can be used as the vulnerability, and a directory traversal can be used to gain the key.

To place a .flag file for the directory traversal, create a .txt file, or a file in any other format based on what you want it to be, and place it in a directory. As the directory traversal can only call specific files and not print directories, you will have to provide the attackers with the path in brief.

First, work out the scenario you want. It can simply be: find John's PC and exploit the common web weakness to find his bank details. I hear he keeps them in C:/BankDetails.txt.

Then, name the computer such that it has something to do with John. John-PC works for me over JohnBoy or LittleJohn, which make it easy for the attacker to identify it. Create the BankDetails.txt file, and place the file in the correct folder.

Once everything is set up, you have to test it and prepare the brief for the attackers. To test, please see the exploitation guide further along in this chapter.

Left arrow icon Right arrow icon

Key benefits

What you will learn

Set up vulnerable services for both Windows and Linux Create dummy accounts for social engineering manipulation Set up Heartbleed replication for vulnerable SSL servers Develop fullsize labs to challenge current and potential testers Construct scenarios that can be applied to Capture the Flag style challenges Add physical components to your scenarios and fire USB missile launchers at your opponents Challenge your own projects with a bestpractice exploit guide to each scenario

What do you get with a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details


Publication date : Jul 24, 2014
Length 190 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781783985982
Category :

Estimated delivery fee Deliver to Chile

Premium 3 - 6 business days

$40.95
(Includes tracking information)

Standard 10 - 13 business days

$19.95

Table of Contents

14 Chapters
Kali Linux CTF Blueprints Chevron down icon Chevron up icon
Credits Chevron down icon Chevron up icon
About the Author Chevron down icon Chevron up icon
About the Reviewers Chevron down icon Chevron up icon
www.PacktPub.com Chevron down icon Chevron up icon
Preface Chevron down icon Chevron up icon
1. Microsoft Environments Chevron down icon Chevron up icon
2. Linux Environments Chevron down icon Chevron up icon
3. Wireless and Mobile Chevron down icon Chevron up icon
4. Social Engineering Chevron down icon Chevron up icon
5. Cryptographic Projects Chevron down icon Chevron up icon
6. Red Teaming Chevron down icon Chevron up icon
Appendix Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.