Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Pentesting for Android Devices
  • Table Of Contents Toc
Learning Pentesting for Android Devices

Learning Pentesting for Android Devices

By : Aditya Gupta
4.3 (11)
close
close
Learning Pentesting for Android Devices

Learning Pentesting for Android Devices

4.3 (11)
By: Aditya Gupta

Overview of this book

Table of Contents (18 chapters)
close
close
Learning Pentesting for Android Devices
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
1
Index

Simple stack-based buffer overflow


In simple words, a buffer is a place to store any kind of data. An overflow occurs when the data in the buffer exceeds the size of the buffer itself. An attacker can then perform an overflow attack so as to get control of the program and execute malicious payloads.

Let's use an example of a simple program and see how we could exploit it. In the following screenshot, we have a simple program with three functions: vulnerable, ShouldNotBeCalled, and main. The following is the program we are trying to exploit:

The ShouldNotBeCalled function is never called during the entire runtime of the program.

The vulnerable function simply copies the argument into a buffer named buff that is 10 bytes in size.

Once we have finished writing the program, we could compile it using gcc, as shown in the next command. Also, we will disable the Address Space Layout Randomization (ASLR) here, just to make the scenario a little bit simpler. ASLR is a security technique implemented by...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Pentesting for Android Devices
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon