Rating:

## Reverse Engineering

### CSS Password

Given the site. We need to find a combination of bits in bytes that will make all the pink rounds turn green.

![image](https://github.com/zer00d4y/writeups/assets/128820441/c77c1c3a-0db7-4bb5-9625-572c98409bf1)

You can see some interesting comments in the source code.

![image](https://github.com/zer00d4y/writeups/assets/128820441/3b1cc89e-fd96-42ec-bacd-b6a48823db49)

`/* LED1 */
/* b1_7_l1_c1 */`

From the first comment you can understand that the following lines are related to roundels.

Upon further examination, you will see that under some comments `/* b1_7_l1_c1 */` there are almost identical css lines. Having studied them, you can understand that one of the two wrappers changes something. b1 in a comment can mean byte1, l1 catcher, c1 checker. And the remaining number can mean a bit.

By examining the contents of the :has pseudo-class, you can understand under what conditions the change occurs.

![image](https://github.com/zer00d4y/writeups/assets/128820441/09d5b610-a5cd-4f69-8a6c-c5776d47763d)

Having made all the roundels green, all we have to do is turn all the bytes into ask characters.

FLAG:

uoftctf{CsS_l0g1c_is_fun_3h}

Original writeup (https://github.com/zer00d4y/writeups/blob/main/CTF%20events/UofTCTF/UofTCTF_2024.md).