Skip to content

Commit

Permalink
Quartz sync: Sep 21, 2024, 10:33 PM
Browse files Browse the repository at this point in the history
  • Loading branch information
Tan-JunWei committed Sep 21, 2024
1 parent eb37d7c commit 5eb7a16
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 6 deletions.
2 changes: 1 addition & 1 deletion content/PicoCTF/General Skills/Super SSH.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Creation Date:
Last Date:
References:
draft:
modified: 2024-09-05T12:53:36+08:00
modified: 2024-09-21T22:11:23+08:00
---
## Challenge Description

Expand Down
74 changes: 72 additions & 2 deletions content/PicoCTF/General Skills/based.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,88 @@ Creation Date:
Last Date:
References:
draft: true
modified: 2024-09-21T22:09:29+08:00
modified: 2024-09-21T22:32:07+08:00
---
## Challenge Description

![[PicoCTF Based.png]]

As the challenge description suggests, we must be equipped with basic knowledge of different data encodings in order to solve this challenge.

However, there are many types of **numerical encodings** or **data encodings** used to represent data in different formats. We will need to know which are used for this challenge.

To do this, we run the command given in the challenge:

```bash
nc jupiter.challenges.picoctf.org 15130
```

>[!info] How does the challenge work?
>
>We are first tasked to convert a **binary (base-2) representation** of a word to the original word. There is a time limit of 45 seconds for us to submit to correct answer.
>
>If the answer is correct, we will then be given an **octal (base-8) representation** of another word. Our task is basically the same; we have to decode the octal representation and submit the correct word.
>
>The final stage will require us to decode the **base64 representation** of a word. After which, the answer submitted is correct, we will be awarded with the flag.
I created a few python scripts to do the conversion for me:

>[!abstract]+ Python scripts used for conversions
>
>**Binary Conversion**
>
>```python
># Binary conversion
>
>word = ""
>binary = input("Enter binary representation: ")
>
>for octet in binary.split():
> char = chr(int(octet,2))
> word += char
>
>print(f"The word is '{word}'.")
>```
>
>**Octal Conversion**
>
>```python
># Octal conversion
>
>word = ""
>octal = input("Enter octal representation: ")
>
>for num in octal.split():
> char = chr(int(num,8))
> word += char
>
>print(f"The word is '{word}'.")
>```
>
>**Hex conversion**
>
>```python
># Hex conversion
>
>word = ""
>hex = input("Enter hex representation: ")
>
>for i in range(0,len(hex),2):
> hex_char = hex[i] + hex[i+1]
> char = chr(int(hex_char,16))
> word += char
>
>print(f"The word is '{word}'.")
>```
### Solving the challenge
![[PicoCTF Based 2.png]]
![[PicoCTF Based 3.png]]
I proceeded to run the above command to connect to the server once again, and used the scripts shown above to convert the values accordingly. I used a separate terminal to do the conversions.
![[PicoCTF Based 3.png]]
After submitting the right input, I was awarded with the flag for this challenge.
> [!NOTE] Flag
> picoCTF{learning_about_converting_values_02167de8}
2 changes: 1 addition & 1 deletion content/PicoCTF/PicoCTF Writeups.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ The challenges are categorised into 6 categories: `Web Exploitation`, [[PicoCTF
- [[PW Crack 4]]
- [[PW Crack 5]]
- [[useless]]
- [[based]]
- [[Based]]



Expand Down
4 changes: 2 additions & 2 deletions content/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: CTF Writeups
modified: 2024-09-20T11:44:54+08:00
modified: 2024-09-21T22:11:13+08:00
---

![[banner.jpg]]
Expand All @@ -13,7 +13,7 @@ modified: 2024-09-20T11:44:54+08:00
Welcome to my Capture The Flag (CTF) writeups page! Here you'll find detailed explanations and solutions to various CTF challenges I've tackled.
## The Ongoing Journey 💡

As of **20 September 2024**, this CTF-writeups page has a total of **102** writeups across different topics. As I continue to explore and glean deeper insights, this project will remain a living document, constantly evolving and improving. Regular updates will be made to refine the content, introduce fresh perspectives, and integrate the latest knowledge. Stay tuned for ongoing enhancements!
As of **21 September 2024**, this CTF-writeups page has a total of **104** writeups across different topics. As I continue to explore and glean deeper insights, this project will remain a living document, constantly evolving and improving. Regular updates will be made to refine the content, introduce fresh perspectives, and integrate the latest knowledge. Stay tuned for ongoing enhancements!
## Navigation 🗺️

### PicoCTF
Expand Down

0 comments on commit 5eb7a16

Please sign in to comment.