Skip to content

Commit

Permalink
completed spoiler component, finalized x86-64 article first part
Browse files Browse the repository at this point in the history
  • Loading branch information
robalb committed Apr 19, 2024
1 parent b8c2748 commit 6656152
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<script>
export let text = ""
</script>
---
export interface Props {
text: string;
}
const { text } = Astro.props;
---

<details>
<summary>
Expand Down Expand Up @@ -56,4 +59,4 @@
border: 0; */
}

</style>
</style>
6 changes: 3 additions & 3 deletions astro-website/src/pages/about.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ I aspire to be a jack of all trades, hopefully master of one in a distant future
In my search for the one trade to master
I've experimented with web development in all of its forms - from frontend to backend, from design
to devops pipelines.<br/>
In 2023, I spent a year working as an infrastructure and backend developer in a consulting firm,
where I developed Cloud Infrastructure for large-scale web and AI projects.

Right now I'm focusing on completing my studies,
- In 2023, I spent a year working as an infrastructure and backend developer in a consulting firm,
where I developed Cloud Infrastructure for large-scale web and AI projects.
- Right now I'm focusing on completing my CS Bachelor,
practicing the art of binary exploitation and
playing CTF competitions in my free time.

Expand Down
19 changes: 10 additions & 9 deletions astro-website/src/pages/posts/moving-data-x64.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: '../../layouts/BlogPost.astro'
title: moving data - a visual guide to x64 assemly
title: moving data - a visual guide to x86-64 assemly
publishDate: 2024-02-18
description:
tags: ['x86-64', 'pwn']
Expand All @@ -11,7 +11,7 @@ import SliderHexdump from '../../components/SliderHexdump.svelte'
import PtrHexdump from '../../components/PtrHexdump.svelte'
import PushHexdump from '../../components/PushHexdump.svelte'
import RegistersTable from '../../components/RegistersTable.svelte'
import Spoiler from '../../components/Spoiler.svelte'
import Spoiler from '../../components/Spoiler.astro'

It's often said that assembly language is complex.
After all, there's a reason why high-level languages and compilers exist—to spare us the intricacies, right?<br/>
Expand Down Expand Up @@ -105,9 +105,9 @@ You will see that this is not the case with numbers.

### numbers

Integers on the x86-64 architecture are stored in little endian format.
Integers in the x86-64 architecture are stored in little endian format.

Let's take a decimal number, for example 3405691582.
Let's take a decimal number, for example 3405691582:
Converted to binary, that number is `0xcafebabe`.<br/>
Unlike what we saw with text, those bytes will not be stored in order.
Instead, little endian architectures will take a number, split it by bytes,
Expand Down Expand Up @@ -148,7 +148,9 @@ contiguous cells, each containing 8 bits of information, and reachable by a nume
Since printing a long list of bytes would take a lot of space,
when visualizing memory we usually group bytes in rows of 8 or 16.
It's also common to include a column to the side that shows the ascii letter associated to each byte.
You can adjust the slider below to try different visualizations of an example memory dump:

The memory dump below was taken from a program that was running on my computer.
Use the slider to adjust the number of bytes you wanto to show in a row.

<SliderHexdump
client:load
Expand All @@ -173,10 +175,9 @@ We mostly interact with these one:

<br/>

As you can see from the table registers that start with the prefix `r` can store 64bit values,
and you can usually access their lower portion.
For example replacing `r` with the prefix `e` gives you
access to the lower 32 bits of the same register.
As you can see from the table above, registers that start with the prefix `r` can store 8 bytes of data.
There are registers that give you access to the lower bytes of larger registers.
for example `eax` gives you access to the lower 4 bytes of `rax`.

### moving data

Expand Down

0 comments on commit 6656152

Please sign in to comment.