# Bbbbloat

<figure><img src="https://2781327171-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMuMceEGBvWN37BjlZKgv%2Fuploads%2FU4wZCDimVYsn34wmCdBy%2Fimage.png?alt=media&#x26;token=6ddb25e1-10c6-4cfd-90b7-3b6b6a38ea62" alt=""><figcaption></figcaption></figure>

starting off the challenge we were given an elf file, running the file the program will ask for the programs favourite number so i went straight to ghidra to see how the code works

<figure><img src="https://2781327171-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMuMceEGBvWN37BjlZKgv%2Fuploads%2FrGwy1jyNztOSNSXk41aZ%2Fimage.png?alt=media&#x26;token=23d22b9f-31a4-4630-b754-fa025141f97f" alt=""><figcaption></figcaption></figure>

after finding the main function we can just see the code and its pretty simple&#x20;

<figure><img src="https://2781327171-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMuMceEGBvWN37BjlZKgv%2Fuploads%2FMy8k1WROh1YSnJS64kCZ%2Fimage.png?alt=media&#x26;token=e866a2aa-40f0-4439-93a6-f21f72acea90" alt=""><figcaption></figcaption></figure>

the program main if is this part so it will take our input then compare it to the hardcoded value

<figure><img src="https://2781327171-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMuMceEGBvWN37BjlZKgv%2Fuploads%2Fvhf76PepfcWPLNXZ4Uua%2Fimage.png?alt=media&#x26;token=04aadaec-2e88-4228-8ae0-5dc0bbafb9ac" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2781327171-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMuMceEGBvWN37BjlZKgv%2Fuploads%2FAdSZ74oVZtrbIb0szpUC%2Fimage.png?alt=media&#x26;token=d4aa1652-2e1c-434b-a328-872a685c4686" alt=""><figcaption></figcaption></figure>
