By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
FantasistaFantasista
  • Home
  • Network
  • System
  • Software
  • Security
    SecurityShow More
    Hướng dẫn chung về Kali Linux
    27/05/2022
    Ransomware tấn công có chủ đích vào các tổ chức
    03/11/2021
    Series Pentesterlab – Day 22: CVE-2007-1860: mod_jk double-decoding
    04/10/2021
    Series Pentesterlab – Day 21: From SQL Injection to Shell
    15/09/2021
    Series Tryhackme – Day 01: Starting Out In Cyber Sec
    13/09/2021
  • Coding
  • Life
Search
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
Reading: Series Pentesterlab – Day 06: Command Execution
Share
Sign In
Notification Show More
Latest News
Hướng dẫn chung về Kali Linux
27/05/2022
Ransomware tấn công có chủ đích vào các tổ chức
03/11/2021
Hướng dẫn kích hoạt IDM Full không cần crack, sử dụng key an toàn
10/10/2021
Series Pentesterlab – Day 22: CVE-2007-1860: mod_jk double-decoding
04/10/2021
Series Pentesterlab – Day 21: From SQL Injection to Shell
15/09/2021
Aa
FantasistaFantasista
Aa
Search
Have an existing account? Sign In
Follow US
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
Fantasista > Blog > Fantasista > Bảo mật > Pentest > Series Pentesterlab – Day 06: Command Execution
Bảo mậtPentest

Series Pentesterlab – Day 06: Command Execution

Fantasista
Fantasista 27/08/2021
Updated 2021/08/28 at 12:02 Chiều
Share
2 Min Read
SHARE
Mục lục
Command Execution 01 – Commands injectionCommand Execution 02Command Execution 03

Command Execution 01 – Commands injection

Commands injection can be used to run arbitrary commands on a server. Multiple payloads can be used to trigger this behaviour. For example, let’s say that the initial command is:

1
ping [parameter]

Where [parameter] is the value you provided in the form or in the URL.

If you look at how the command line works, you can find that there is multiple way to add more commands:

  • command1 && command2  that will run command2 if command1 succeeds.
  • command1 || command2  that will run command2 if command1 fails.
  • command1 ; command2  that will run command1  then command2 .
  • command1 | command2  that will run command1 and send the output of command1 to command2.
  • …

In this application, we can provide a parameter to command1, but there is no command2. What we are going to do is add our own command. Instead of sending the [parameter] to the command:

1
ping 127.0.0.1

Where 127.0.0.1 is our [parameter]. We are going to send a malicious [parameter] that will contain another command:

1
ping <b>127.0.0.1 ; cat /etc/passwd</b>

The application will think that 127.0.0.1 ; cat /etc/passwd is just a parameter to run command1. But we actually injected command2: cat /etc/passwd.

Now, what we want to do is run the command to score: /usr/local/bin/score [uuid]. We can just use the line above to run this command instead of cat /etc/passwd.

Command Execution 02

Tại ví dụ này, coder đã chặn một vài ký tự đặc biệt nhưng quên không chặn

Chúng ta inject command trong cặp command`

1
https://ptl-c1f74100-1af698dc.libcurl.st/?ip=`/usr/local/bin/score%2078a02cad-6b9e-4f38-8b26-2176490366c0`

Command Execution 03

In this challenge, the developer fixed the issue from the previous one and filter even more special characters.

However, the developer forgot that you can use $(command)  to run a command.

1
https://ptl-ad8549f0-5e3028b7.libcurl.st/?ip=$(/usr/local/bin/score%2078a02cad-6b9e-4f38-8b26-2176490366c0)

 

You Might Also Like

Hướng dẫn chung về Kali Linux

Ransomware tấn công có chủ đích vào các tổ chức

Series Pentesterlab – Day 22: CVE-2007-1860: mod_jk double-decoding

Series Pentesterlab – Day 21: From SQL Injection to Shell

Series Tryhackme – Day 01: Starting Out In Cyber Sec

TAGGED: pentesterlab

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Fantasista 27/08/2021
Share this Article
Facebook TwitterEmail Copy Link Print
Share
Posted by Fantasista
Follow:
Xin chào, mình là Tân. Mình tạo blog này 01/06/2021. Đây là nơi mình ghi chép lại những suy nghĩ, cảm nhận trong cuộc sống và những kiến thức mà mình học được.
Previous Article Ransomware: xác định, bảo vệ, phát hiện và khôi phục
Next Article Series Pentesterlab – Day 07: Directory Traversal
Leave a comment Leave a comment

Trả lời Hủy

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Stay Connected

235.3k Followers Like
69.1k Followers Follow
11.6k Followers Pin
56.4k Followers Follow
136k Subscribers Subscribe
4.4k Followers Follow
- Advertisement -
Ad imageAd image

Latest News

Hướng dẫn chung về Kali Linux
Bảo mật Công cụ bảo mật 27/05/2022
Ransomware tấn công có chủ đích vào các tổ chức
An toàn thông tin Bảo mật 03/11/2021
Hướng dẫn kích hoạt IDM Full không cần crack, sử dụng key an toàn
Phần mềm Tiện ích 10/10/2021
Series Pentesterlab – Day 22: CVE-2007-1860: mod_jk double-decoding
Bảo mật Pentest 04/10/2021
https://pbs.twimg.com/profile_images/1542611508093661184/MR5LYGqH_normal.jpg
@envato
1.5k Following
71k Followers
https://pbs.twimg.com/profile_images/1542611508093661184/MR5LYGqH_normal.jpg 1 giờ ago
@reputeinfosys Hi there, can you provide us with the ticket number to your request and we will make sure someone ge… https://t.co/TPdKynvll8
https://pbs.twimg.com/profile_images/1542611508093661184/MR5LYGqH_normal.jpg 1 giờ ago
@joeyancey_ Hi there, we would be more than willing to review this case for you. Please submit a support ticket her… https://t.co/V7jXIg1G3q
https://pbs.twimg.com/profile_images/1542611508093661184/MR5LYGqH_normal.jpg 10 giờ ago
@barts_ron Hi! Thanks for contacting us. It looks like all our systems are running smoothly. You can check the stat… https://t.co/Haz9yXFnMM

You Might also Like

Hướng dẫn chung về Kali Linux

27/05/2022
An toàn thông tinBảo mật

Ransomware tấn công có chủ đích vào các tổ chức

03/11/2021
Bảo mậtPentest

Series Pentesterlab – Day 22: CVE-2007-1860: mod_jk double-decoding

04/10/2021
Bảo mậtPentest

Series Pentesterlab – Day 21: From SQL Injection to Shell

15/09/2021
//

We influence 20 million users and is the number one business and technology news network on the planet

Quick Link

  • About
  • Contact
  • FAQs

Top Categories

  • Home
  • Network
  • System
  • Software
  • Security
  • Coding
  • Life
FantasistaFantasista
Follow US

© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.

Join Us!

Subscribe to our newsletter and never miss our latest news, podcasts etc..

Zero spam, Unsubscribe at any time.

Removed from reading list

Undo
Welcome Back!

Sign in to your account

Register Lost your password?