Warmup

Warmup : Welcome to securinets CTF

In this task we are dealing with very simple function main:

undefined8 main(void)
{
    int64_t iVar1;
    undefined8 uVar2;
    uint32_t var_8h;
    undefined8 var_4h;
    
    write(1, 0x988, 0x1a);
    read(0, 0x201080, 0x31);
    iVar1 = strlen(0x201080);
    *(undefined *)(iVar1 + 0x20107f) = 0;
    var_8h = 0;
    strcpy(rsi, 0x201080);
    uVar2 = strlen(0x201080);
    memfrob(0x201080, uVar2);
    var_4h._0_4_ = 0;
    while ((int32_t)var_4h < 0x14) {
        var_8h = var_8h + (int32_t)(char)(*(uint8_t *)((int64_t)(int32_t)var_4h + 0x201020) ^
                                         *(uint8_t *)((int64_t)(int32_t)var_4h + 0x201080));
        var_4h._0_4_ = (int32_t)var_4h + 1;
    }
    if (var_8h == 0) {
        printf(0x9a8, rsi);
    } else {
        puts(0x9d5);
    }
    return 0;
}

In this function the memfrob is used, from manual you can learn that this function is xoring buffer with key 42, solution:

>>> a = [  0x46, 0x19, 0x5e, 0x0d, 0x59, 0x75, 0x5d, 0x1e, 0x58, 0x47,
...   0x75, 0x1b, 0x5e, 0x75, 0x5f, 0x5a, 0x75, 0x48, 0x45, 0x53]
>>> r = []
>>> for b in a:
...   r.append(b^42)
...
>>> r
[108, 51, 116, 39, 115, 95, 119, 52, 114, 109, 95, 49, 116, 95, 117, 112, 95, 98, 111, 121]
>>> "".join([chr(c) for c in r])
"l3t's_w4rm_1t_up_boy"

And execution:

Welcome to SECURINETS CTF
l3t's_w4rm_1t_up_boy
Good job
You can submit with securinets{l3t's_w4rm_1t_up_boy}