---
# System prepended metadata

title: '[活動組內測] 煉蠱大會遊戲方法 (Malware Playground Howto) 2021-ALPHA'

---

[活動組內測] 煉蠱大會遊戲方法 (Malware Playground Howto) 2021-ALPHA
===========================================

（活動組內測的新手區並無設置HTTP伺服器塗鴉區，網址也與正式版不同，其餘則是都一樣。)

TL;DR
-----

Intro Session:
Web: http://mpg-staging.hitcon.org:29175
TCP Command Stream: mpg-staging.zuan.im:29171
TCP Message Stream: mpg-staging.zuan.im:29172

Advanced Session:
Web: http://mpg-staging.hitcon.org:29275
TCP Command Stream: mpg-staging.hitcon.org:29271
TCP Message Stream: mpg-staging.hitcon.org:29272

Web連上後可以嘗試以下指令:
```
CurrentGame
Scoreboard
PlayerInfo
Cmd /usr/bin/php -S 0.0.0.0:<PORT NUMBER>
```

連線介紹
------

玩家可以透過Raw TCP Socket或是Web界面來連上遊戲。Web界面較容易使用，但效能較差且不好自動化，而Raw TCP Socket效能較好，適合進階玩家。

Player can choose to use Raw TCP Socket or the Web interface to connect to the game. The Web interface is easier to use, while the Raw TCP Socket interface is faster and easier to interface with code.

Raw TCP Socket
--------------

玩家可以透過Raw TCP Socket連上煉蠱伺服器。遊戲共有兩個Port，一個用於下指令（以下簡稱指令Port），另一個用於觀看目前狀況。（以下簡稱狀況Port）

指令Port只能用來輸入指令，只有少數指令的結果會透過指令Port回傳。其他指令的回傳資料會顯示在狀況Port，因此建議同時開兩個視窗然後同時看兩者。

Players can connect to the malware playground through raw TCP socket. There are 2 ports, one is for sendin commands (hereafter "cmd port"), another is for watching the current status (hereafter "status port").

cmd port can only be used to key in/send command. Only a few commands will respond on the cmd port. The response for other commands will be available on the status port instead. Therefore, it is recommended that two terminal windows be opened at the same time for each of the ports.

Web Interface
-------------

玩家可以直接打開Web界面，界面左邊是目前所有訊息，左下能夠輸入訊息，右上可以選擇觀看哪些訊息，右邊中間可以看目前遊戲規則及狀態，右下可以觀看記分板。

The player can open the web interface with a browser directly. In the user interface, on the left is the all the messages, on the bottom left is the prompt for entering any chat or command. On the top right users can filter what messages are shown, on the center right is the information on the current game (rules, status... etc), on the bottom right is the scoreboard.

連上新手村 Connect to the tutorial section
------------------------------------------

新手村位於mpg-staging.hitcon.org Port 28171 (指令port) Port 28172 (狀態port)。
The tutorial/intro section is on mpg-staging.hitcon.org Port 28171 (cmd port) and Port 28172 (status port).

之後，可以開啟兩個不同視窗，使用nc指令連上煉蠱伺服器：
After that, connect to malware playground with the following commands in two different command prompt:
```
nc mpg-staging.hitcon.org 28132
nc mpg-staging.hitcon.org 28133
```
注意，必須同時打開兩個視窗，各自輸入以上兩個指令（一個視窗一個指令）。
Note, you'll need to open two terminals and enter the commands in them respectively (one in each).

加入後，於指令Port輸入:
After that, enter the following in Cmd port:
```
Nick <Your Nick>
```
可以設定你的暱稱。限制英文大小寫數字4-20個字長。
Will set your nickname, which is limited to alphanumeric (both cases), length of 4-20.

```
CurrentGame
```
即可查看目前遊戲規則。
and you'll see the rules for the current game.

該廠遊戲輸入第一個指令後（例如上述的CurrentGame），系統會透過狀態Port告訴你你的Port Number，請你記好它。請注意每一場遊戲的port number可能不一樣。
After entering the first command on speaking on that channel for the first time. The system will tell you your port number through status port. Please take note of it. Note that the port number may be different on every game.

如果你忘了你的Port Number，可以輸入PlayerInfo指令取得他：
If you lost your port number, you can use the PlayerInfo command.
```
PlayerInfo
```

接下來，在指令Port輸入以下指令重複Listen在某個Port Number：
Enter the following command in cmd port to listen on your port number:
```
Cmd /usr/bin/php -S 0.0.0.0:<YOUR PORT NUMBER>
```

如果你的Process沒有被別人Kill掉，去Scoreboard就會看到你開始得分。
If your process is not killed, then you'll see that your score is increasing on the scoreboard.

在指令Port中輸入下列指令可以看Scoreboard:
Enter the following command on cmd port to see the scoreboard on IRC:
```
Scoreboard
```

最後，新手村遊戲規則為：
1. Process存活每秒1分，Port可以被連線每秒5分。可對外連網。
2. 可以直接執行指令。
3. 友善新手，請不要太頻繁的獵殺別人的Process。
4. 這場保留最久，原則上不刪除檔案，請多利用塗鴉區 (新手村中伺服器有跑一台http server)。

Lastly, the rules for the tutorial section is:
1. Process survival earns you 1 point per second. Port is up earns you 5 points per second. You may connect to the internet from the machine.
2. You can execute commands directly.
3. Please be friendly to noobs, and not kill them too frequently.
4. This room/game will be kept running for the duration of the conference, and generally we won't delete files/reset the game, so you're welcome to use the doodle area (the HTTP server running in the room).

進階場次
--------

進階場次位於同伺服器27171, 27172 Port

遊戲規則與獎勵 Rules and Rewards
================================

遊戲規則 Rules
--------------

規則：
1. 每一場次有自己的計分規則，有的是需要你執行的Process存活，有的是需要你Listen在某個Port。
2. 每一場次的入侵方法也可能不同，有的直接提供輸入指令或Shellcode。
3. 於該場輸入CurrentGame顯示該場次的計分方式，入侵方法與規則。
4. 禁止攻擊位於/hitcon目錄中的遊戲Infra，不得（包含但不限於）修改，模擬，注入，阻擋，偽裝成該目錄中跑起來的伺服器，亦不得阻擋或為造Port 29100~29200中的任何流量。
5. 禁止癱瘓伺服器，例如使用Fork Bomb或是佔滿所有記憶體/磁碟空間。
6. 有上述違規行為，其他玩家可以向管理員檢舉。管理員可以將違規者禁賽及禁止其獲得獎勵的HITCON Token。

The rules are:
1. Each game have different scoring policy. Some requires your process to be alive, the other requires your port to be reachable.
2. Each game, the access you've to the machine is different. For some you can enter commands dircetly, others you can only use shellcode.
3. Enter the "CurrentGame" command to see the rules on scoring policy and access you've.
4. Do not attack the game infra, located in /hitcon directory. You may not (including but not limited to), modify, emulate, inject, block, masquerade as anything that runs from that directory. You must not block or spoof any traffic on port 29100~29200.
5. Do not attempt denial of service attack on the machine, such as using fork bomb, or filling up the memory/disk space.
6. If there's any prohibited action, other players may notify the administrators. The administrator may prohibit the violators from player, and/or forfeiting their reward HITCON tokens.

