Giter Club home page Giter Club logo

Comments (1)

kevindevos avatar kevindevos commented on June 12, 2024
 {
                "bytes": 4,
                "type": "int",
                "name": "control",
                "address": "rbp-0x4"
            },
            {
                "bytes": 64,
                "type": "buffer",
                "name": "buf1",
                "address": "rbp-0x70"
            },
            {
                "bytes": 32,
                "type": "buffer",
                "name": "buf2",
                "address": "rbp-0x30"
            }
        ],
  int control;
  char buf2[32];
  char buf1[64];

  control = 3;
  fgets(buf1, 45, stdin);
  strcpy(buf2, buf1);

Se vires, são lidos 45 bytes para buf1, tudo bem. Agora em strcpy, estás a copiar 45 bytes para um buffer de 32, que começa em rbp-0x30 ou seja , escreves desde rbp-0x30 sobre rbp-0x10, até rbp-0x03 inclusivé, causando overflow de control, e invalid access no primeiro endereço não alocado a nenhuma var local que é rbp-0x10 como esperado.

Se olhares para o assembly, é o que esta a ser feito. É isto ou estás te a referir ao código objeto mesmo ou a compiilar e a correr? Porque isso também variava por maquina

from ssof-project.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.