Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8797847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:56:20+00:00 2026-06-13T23:56:20+00:00

So I have a program where I ask the user to input an entry,

  • 0

So I have a program where I ask the user to input an entry, which it compares to the value “zoidberg.” If it isn’t zoidberg, then it tells the user that the entry is incorrect. I didn’t write it, but I was given it and told to find the exploit and fix it.

First off, I want to confirm (or deny if they are wrong) two things. I haven’t done asm programming in a hot minute, so I’m not sure if this assumption is right.

My assumptions:

The memory address where the user’s entry is: [esp+410h+var_410]?

The memory address where the entry zoidberg is stored is: [esp+410h+var_40C]?

I really have no idea if that is a temporary location or its final location. I’m so confused.

Also, the test call compares eax to itself, could that be the exploit that needs to be fixed?

; Attributes: bp-based frame

public main
main proc near

var_410= dword ptr -410h
var_40C= dword ptr -40Ch
var_400= dword ptr -400h

push    ebp
mov     ebp, esp
and     esp, 0FFFFFFF0h
sub     esp, 410h       ; char *
mov     [esp+410h+var_410], offset anEntry ; "enter an entry to continue:"
call    _puts
lea     eax, [esp+410h+var_400]
mov     [esp+410h+var_410], eax
call    _gets
mov     [esp+410h+var_40C], offset aZoidberg ; "zoidberg"
lea     eax, [esp+410h+var_400]
mov     [esp+410h+var_410], eax
call    _strcmp
test    eax, eax
jnz     short loc_804846E

mov     [esp+410h+var_410], offset aNeedAnEntry?Wh ; "need an entry? why not zoidberg?"
call    _puts
jmp     short loc_804847A


loc_804846E:            ; "your entry is bad, and you should feel"...
mov     [esp+410h+var_410], offset aYourEntryIsBa
call    _puts


loc_804847A:
mov     eax, 0
leave
retn
main endp
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:56:21+00:00Added an answer on June 13, 2026 at 11:56 pm

    The addresses [esp+410h+var_410] are local variables.

    The lines with “offset” mostly load their values with the addresses of the strings

    Probably var_400 is the buffer for the text to read.

    The problem is a buffer overflow, as usual, work out what happens if you enter a really large line in gets.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program which creates JButtons which are then added to a JPanel
I have a program that saves an image in a local directory and then
I have an Address Book Program that [1] adds Entry [2] delete entry [3]
I have written the following very simple Java program to ask user enter a
I am trying to make a program that will ask a user to enter
I made an ATM program. I have a try catch that will ask for
I am trying to have my user input not crash my program by restricting
I want to make a program in C which will ask the user to
When I ask a user to enter a quantity for a program I have
I need to write a program, that will ask a user to enter a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.