Comments (1)
{
"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)
- Ordem das instruções é dada pela ordem no json e não pela "pos"
- Registers are saved in each stack frame HOT 1
- execute user defined functions and respective argument passing
- check direct access like a[10] = 20 for vulnerabilities
- test advanced functions for call sprintf, scanf, fscanf, snprintf, read in executer.py
- implement assembly instructions ret, leave, nop, push, sub, add,cmp, test, je, jmp, jne in executer.py
- A copy of the function variables must be saved in the stack frame instead of getting it from the function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ssof-project.