Let's implement a simple code that loads a file into a vector and then save the vector with following functions:
- err
- load
- save
- main
Lets identify the typical way in C++ to print to stdout with the operator "<<"
The basic_ostream is initialized writing the word "error" to the cout, and then the operator<< again to add the endl.
The Main function simply calls "vec = load(filename)" but the compiler modified it and passed the vector pointer as a parámeter. Then it bulds and prints "loaded " << size << " users".
And finally saves the vector to /tmp/pwd and print "saved".
Most of the mess is basically the operator "<<" to concat and print values.
Also note that the vectors and strings are automatically deallocated when exit the function.
And here is the code:
Let's take a look to the load function, which iterates the ifs.getline() and push to the vector.
First of all there is a mess on the function definition, __return_storage_ptr is the vector.
the ifstream object ifs is initialized as a basic_ifstream and then operator! checks if it wasn't possible to open the file and in that case calls err()
We see the memset and a loop, getline read a cstr like line from the file, and then is converted to a string before pushing it to the vector. lVar1 is the stack canary value.
In this situations dont obfuscate with the vector pointer vec initialization at the begining, in this case the logic is quite clear.
The function save is a bit more tricky, but it's no more than a vector iteration and ofs writing.
Looping a simple "for (auto s : *vec)" in the decompiler is quite dense, but we can see clearly two write, the second write DAT_0010400b is a "\n"
As we see, save implememtation is quite straightforward.
More information
- Computer Hacker
- Black Hat Hacker Tools
- Pentest Tools Linux
- Hack Tools For Mac
- Pentest Tools Free
- Best Hacking Tools 2020
- Hacking Apps
- New Hacker Tools
- What Is Hacking Tools
- Blackhat Hacker Tools
- Hacking Tools Online
- Pentest Tools Url Fuzzer
- Hacker Tools For Ios
- How To Make Hacking Tools
- Hacking Tools Windows
- Hack Tools Download
- Hack Tools Mac
- Github Hacking Tools
- Hacker Search Tools
- Pentest Tools Open Source
- Pentest Tools Apk
- Easy Hack Tools
- Hacker Tools Linux
- Hacking Tools 2019
- Bluetooth Hacking Tools Kali
- How To Install Pentest Tools In Ubuntu
- Install Pentest Tools Ubuntu
- Pentest Tools For Android
- Hack Tools Online
- Pentest Tools Open Source
- Hacking Tools For Mac
- Kik Hack Tools
- Hacker Tools 2020
- Hacking Tools Windows 10
- Hack Website Online Tool
- Hacking Apps
- Hacking Apps
- Tools 4 Hack
- Termux Hacking Tools 2019
- Pentest Tools Download
- Hack Tools
- Pentest Tools Url Fuzzer
- Pentest Tools Website Vulnerability
- Hack Tools 2019
- Hack Tool Apk
- How To Install Pentest Tools In Ubuntu
- Hacking Tools For Windows
- Hacking Tools For Mac
- Hack Tool Apk
- Pentest Tools Open Source
- Nsa Hack Tools
- How To Hack
- Hacking Tools For Mac
- Pentest Tools
- Nsa Hack Tools
- Hack And Tools
- Hacking Tools Online
- Hacker Security Tools
- Top Pentest Tools
- Hacking Apps
- Termux Hacking Tools 2019
- Best Hacking Tools 2020
- Pentest Tools Find Subdomains
- Hacker Hardware Tools
- Tools 4 Hack
- Pentest Tools Url Fuzzer
- Easy Hack Tools
- Hacker Tools Online
- Hack Tools Download
- Pentest Tools Website
- Hacking Tools 2020
- Free Pentest Tools For Windows
- Hacker Tools Github
- Pentest Tools Download
- Hacker Techniques Tools And Incident Handling
- Hackrf Tools
- Pentest Tools
- Hacker Hardware Tools
- Hacker Tools Hardware
- Hack Tool Apk
- What Are Hacking Tools
- Pentest Tools Url Fuzzer
- Hacking Tools For Games
- How To Make Hacking Tools
- Best Hacking Tools 2020
- Hack Tools For Ubuntu
- Hacker Tools Apk
- Pentest Tools For Android
- New Hacker Tools
- Pentest Automation Tools
- Hacker Tools Apk
- Tools Used For Hacking
- Termux Hacking Tools 2019
- Pentest Tools Github
- Pentest Tools Download
- Hacking Tools For Windows 7
- Best Pentesting Tools 2018
- Hacker Tools Apk
- Hacker Tools For Ios
- Hack Tools
- Best Hacking Tools 2020
- Hacker Tools Linux
- Hacker Tools Apk
- Hacker Tool Kit
- Usb Pentest Tools
- What Is Hacking Tools
- Hacker Tools Free Download
- Pentest Automation Tools
- Hackrf Tools
- Pentest Tools Website Vulnerability
- Pentest Tools Find Subdomains
- Hacker Tools Hardware
- Hacker Tools Free
- Hacker Tools Free
- Hacker Tools
- Hacking Tools Windows 10
- Hacking Tools For Beginners
- Pentest Tools Linux
- Hacking Tools Mac
- Pentest Tools Github
- Pentest Tools Url Fuzzer
- Hacking Tools Hardware
- Hacker Tools Free
- Hack Rom Tools
- Pentest Tools Bluekeep
- Pentest Box Tools Download
- Tools Used For Hacking
- Growth Hacker Tools
- Best Hacking Tools 2020
- Hacker Tools For Windows
- Hacking Tools Kit
- Underground Hacker Sites
- Bluetooth Hacking Tools Kali
- Hack Tools For Windows
- Pentest Tools Windows
- Pentest Tools Online
No hay comentarios:
Publicar un comentario