How I used eog utility to pull off a small Linux exploit

Back in 2012, after my article on Linux ELF Virus was published in Linux Journal, I was curious to come up with a trigger point for this virus. I mean what would compel a Linux user to execute it for the very first time? I thought about it many times but could not come up with something in a working state.

Cut to the present times – Last Friday, when I was coming back from my office through office bus, I was indulged in some technical talk with a guy who works on encoders and decoders for various media file formats. Suddenly the same thought struck in my mind and I asked him whether it is possible for him to come up with a situation where a Linux user clicks on an image file, the image gets displayed but a notorious code gets executed in the back end?
(more…)

Cscope – A developer’s tool for browsing source code

When we talk about projects in C/C++, or any other programming languages, it is pretty common that as the project advances, the lines of code increases, and hence increases the number of source files in the project. Although, as a developer, it is always intended to make the sources more and more organized, predictable and simple at the same time. Still, we all would agree, when it comes to browsing the code, debugging while moving through the definitions and function calls in different sources, it gives a hard time.
(more…)

Anatomy of command line arguments in Linux

While designing a simple C program or a full fledged command line application, it is pretty usual to have a requirement for arguments to be passed while running the executable/application. These arguments are known as command line arguments. These parameters govern the behaviour of the program to some extent, as these are the inputs based on which output is computed/displayed.

Another usage of these command line arguments comes in the form of various options of a command, be it on Linux, Windows or any platform. In Linux, any command is actually an executable being triggered through Linux shell. In code, the entry point to this executable (in ELF format) will be the main() method . The Linux shell communicates the command line arguments to the program by passing these parameters to the main() method. In this article, we shall go through the advanced concepts related to command line arguments in Linux using C programming examples.
(more…)

Linux time and date functions – A must read for developers

In this pacing world, time plays an important role in every aspect of Life. Even in industries like embedded, automotive etc time plays a very important role. Seems like everyone is working just to minimize this parameter called time. If we talk about software industry, here too, minimising the time complexity is the most prominent objective driving thick and thin. Moreover, Benchmarking software and programs are taken much seriously these days in research as well as in industry. However, talking in terms of software running on an OS, what is time and how do we measure it? Here in this article we shall be learning about various Linux time and date functions.
(more…)

An introduction to Linux device files

Everything in Linux is a file. This is a common phrase related to Linux. As and when one gradually learns Linux, he/she gets to understand the fundamentals behind this phrase. In Linux even hardware devices are recognized as files. These are known as Linux device files or special files. Here in this article, we shall be compass the way Linux deals with Device files.
(more…)

Write and compile a basic Loadable Kernel Module for Linux

One of our previous article (here) discusses the concepts and theory of Linux Kernel Modules. We became acquainted with the LKMs as a compiled object code that gets linked to the kernel when loaded and gets unlinked on unloading. Now, its time to delve into the programming part of it i.e. how to develop them. Here in this article we will understand the details of how to program, compile, load and unload a Loadable kernel module in Linux.
(more…)

Linux Kernel Logs

Logging information is an essential and most vital element of programming. Adding logs is one of the most popular debugging technique. In Linux C programming logging mechanisms differ in case of user level programming and kernel programming. Here in this article we will discuss all aspects of Linux Kernel Logs.
(more…)

Basics of Loadable Kernel Modules (LKM) in Linux

Linux kernel is the core of any Unix-like operating system which provides basic functionalities and working model of the operating system. However, what if one wants to add a new feature, for example, supporting a new device?
(more…)

How Linux is built

How Linux is Built ? This is a common question that pops up in mind of those who are new to Linux. Well, I recently found a video on YouTube that explains the basics of how Linux is built. The video talks not only about the Linux developement but also some eye-opening statistics on how rapidly Linux is changing the digital world around us.
(more…)

5 GCC compiler options worth sharing

If you have worked on Linux software development using C language, you would have definitely come across the gcc compiler. It is one of the most popular C compiler as of today. GCC contains a huge list of compiler options. For those who are new to gcc, they must have knowledge of some basic gcc compiler options. This article would discuss five gcc compiler options that I personally use the most.
(more…)

© 2013 MyLinuxBook. All rights reserved. Site Admin · Entries RSS · Comments RSS
Powered by WordPress · Designed by Theme Junkie
Close
Please support MyLinuxBook
Let your friends and followers know about MyLinuxBook

Twitter

Facebook

Google+