Tags: re 

Rating:

# Pilgrim (rev500)
Original writeup and PoC [here](https://github.com/numinit/CTF/blob/master/SwampCTF-2018/rev/pilgrim-500/pilgrim.md)

$ nc chal1.swampctf.com 1900

```
You awake in the swamp temple, july 3, 3085. The mist of the early morning dampens your leather armor while you hear the wildlife of the wetlands begin the day.

A pilgrim approaches.
Hi:)
Enter a number:
1. Reset Network
2. Speak
3. Directly Edit Weights
4. Directly Edit bias
```

Download "NNawkward_pilgrim" - it’s an x86_64 binary. Run strings, and... oh boy.

It's not stripped, which is a breath of fresh air after the gameboy challenge,
but it's full of C++ templates.

```
/home/ambrose/eigen/Eigen/src/Core/PlainObjectBase.h
(!(RowsAtCompileTime!=Dynamic) || (rows==RowsAtCompileTime)) && (!(ColsAtCompileTime!=Dynamic) || (cols==ColsAtCompileTime)) && (!(RowsAtCompileTime==Dynamic && MaxRowsAtCompileTime!=Dynamic) || (rows<=MaxRowsAtCompileTime)) && (!(ColsAtCompileTime==Dynamic && MaxColsAt>
((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime==Dynamic || size<=MaxSizeAtCompileTime)) || SizeAtCompileTime == size) && size>=0
/home/ambrose/eigen/Eigen/src/Core/DenseCoeffsBase.h
index >= 0 && index < size()
row >= 0 && row < rows() && col >= 0 && col < cols()
/home/ambrose/eigen/Eigen/src/Core/CommaInitializer.h
m_row

Original writeup (https://github.com/numinit/CTF/blob/master/SwampCTF-2018/rev/pilgrim-500/pilgrim.md).