Skip to content

Commit 43bd97f

Browse files
committed
correct a description in house_of_lore
1 parent 16c9a35 commit 43bd97f

File tree

7 files changed

+9
-10
lines changed

7 files changed

+9
-10
lines changed

glibc_2.23/house_of_lore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ int main(int argc, char * argv[]){
7171
fprintf(stderr, "Freeing the chunk %p, it will be inserted in the unsorted bin\n", victim);
7272
free((void*)victim);
7373

74-
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are nil\n");
74+
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are the unsorted bin's header address (libc addresses)\n");
7575
fprintf(stderr, "victim->fwd: %p\n", (void *)victim[0]);
7676
fprintf(stderr, "victim->bk: %p\n\n", (void *)victim[1]);
7777

glibc_2.27/house_of_lore.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int main(int argc, char * argv[]){
8989
fprintf(stderr, "Freeing the chunk %p, it will be inserted in the unsorted bin\n", victim);
9090
free((void*)victim);
9191

92-
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are nil\n");
92+
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are the unsorted bin's header address (libc addresses)\n");
9393
fprintf(stderr, "victim->fwd: %p\n", (void *)victim[0]);
9494
fprintf(stderr, "victim->bk: %p\n\n", (void *)victim[1]);
9595

@@ -119,7 +119,6 @@ int main(int argc, char * argv[]){
119119

120120
void *p3 = malloc(0x100);
121121

122-
123122
fprintf(stderr, "This last malloc should trick the glibc malloc to return a chunk at the position injected in bin->bk\n");
124123
char *p4 = malloc(0x100);
125124
fprintf(stderr, "p4 = malloc(0x100)\n");
@@ -129,7 +128,7 @@ int main(int argc, char * argv[]){
129128

130129
fprintf(stderr, "\np4 is %p and should be on the stack!\n", p4); // this chunk will be allocated on stack
131130
intptr_t sc = (intptr_t)jackpot; // Emulating our in-memory shellcode
132-
131+
133132
long offset = (long)__builtin_frame_address(0) - (long)p4;
134133
memcpy((p4+offset+8), &sc, 8); // This bypasses stack-smash detection since it jumps over the canary
135134

glibc_2.31/house_of_lore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int main(int argc, char * argv[]){
8989
fprintf(stderr, "Freeing the chunk %p, it will be inserted in the unsorted bin\n", victim);
9090
free((void*)victim);
9191

92-
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are nil\n");
92+
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are the unsorted bin's header address (libc addresses)\n");
9393
fprintf(stderr, "victim->fwd: %p\n", (void *)victim[0]);
9494
fprintf(stderr, "victim->bk: %p\n\n", (void *)victim[1]);
9595

glibc_2.32/house_of_lore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int main(int argc, char * argv[]){
8989
fprintf(stderr, "Freeing the chunk %p, it will be inserted in the unsorted bin\n", victim);
9090
free((void*)victim);
9191

92-
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are nil\n");
92+
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are the unsorted bin's header address (libc addresses)\n");
9393
fprintf(stderr, "victim->fwd: %p\n", (void *)victim[0]);
9494
fprintf(stderr, "victim->bk: %p\n\n", (void *)victim[1]);
9595

glibc_2.33/house_of_lore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int main(int argc, char * argv[]){
8989
fprintf(stderr, "Freeing the chunk %p, it will be inserted in the unsorted bin\n", victim);
9090
free((void*)victim);
9191

92-
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are nil\n");
92+
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are the unsorted bin's header address (libc addresses)\n");
9393
fprintf(stderr, "victim->fwd: %p\n", (void *)victim[0]);
9494
fprintf(stderr, "victim->bk: %p\n\n", (void *)victim[1]);
9595

glibc_2.34/house_of_lore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int main(int argc, char * argv[]){
8989
fprintf(stderr, "Freeing the chunk %p, it will be inserted in the unsorted bin\n", victim);
9090
free((void*)victim);
9191

92-
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are nil\n");
92+
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are the unsorted bin's header address (libc addresses)\n");
9393
fprintf(stderr, "victim->fwd: %p\n", (void *)victim[0]);
9494
fprintf(stderr, "victim->bk: %p\n\n", (void *)victim[1]);
9595

glibc_2.35/house_of_lore.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ int main(int argc, char * argv[]){
3838

3939
fprintf(stderr, "\nWelcome to the House of Lore\n");
4040
fprintf(stderr, "This is a revisited version that bypass also the hardening check introduced by glibc malloc\n");
41-
fprintf(stderr, "This is tested against Ubuntu 20.04.2 - 64bit - glibc-2.31\n\n");
41+
fprintf(stderr, "This is tested against Ubuntu 22.04 - 64bit - glibc-2.35\n\n");
4242

4343
fprintf(stderr, "Allocating the victim chunk\n");
4444
intptr_t *victim = malloc(0x100);
@@ -89,7 +89,7 @@ int main(int argc, char * argv[]){
8989
fprintf(stderr, "Freeing the chunk %p, it will be inserted in the unsorted bin\n", victim);
9090
free((void*)victim);
9191

92-
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are nil\n");
92+
fprintf(stderr, "\nIn the unsorted bin the victim's fwd and bk pointers are the unsorted bin's header address (libc addresses)\n");
9393
fprintf(stderr, "victim->fwd: %p\n", (void *)victim[0]);
9494
fprintf(stderr, "victim->bk: %p\n\n", (void *)victim[1]);
9595

0 commit comments

Comments
 (0)