write your own facebook post BOT

6:36 PM Unknown 0 Comments

Introduction

Once ,I have attended a conferences about malware's and firmware exploitation and how it is important to keep yourself secure from this type of attacks ,but ,this actually ,have inspired me to start a new project and this time with BOT(s) ,In fact ,am looking for an advanced bot that can learn and act like humans ,however,the main question that has stacked in my mind is "How can be the ability of computers and robots if they learn the behavior of humans and act like them ?!" ,In addition ,with the machine learning today machines can learn things but,this is still limited for now .On the other hand ,how can hackers use this technique to their advantage by programming bots to do things without even get noticed by antivirus or firewall ,or IDS ! .

Abstract

This article shows you how to start writing your own facebook post bot without using any URL ,API,or external application ,Its an easy way to getting started with the technique to do the same thing .
watch DEMO

Main idea of the BOT

The main idea of the bot ,is to get the current coordination of the mouse pointer on the screen ,and through the current location we can get the couple of (X,Y) ,this helps us to locate any form or components on the screen ,so ,the bot simulate the mouse and the keyboard function . 

On facebook page we can get the coordination of the buttons ,form ,post field ........ and through this ,we focus on the component and execute commands . (this is only the first and the easiest part of the script we can go far with this and do anything almost ,just by developing some programs that can learn the user behavior and then act like them to do another thing :D {H4Ck3rs_L0VE_ThiS_StuFF} )

1.xdotool

What is xdotool? 

This tool lets you simulate keyboard input and mouse activity, move and resize windows, etc. It does this using X11's XTEST extension and other Xlib functions.

$ sudo apt-get install xdotool

2. Get the (X,Y) coordination

By using xdotool ,we can get the current position of the pointer on the screen .Move the pointer and focus on the field ,then execute xdotool with getmouselocation option .

now execute the xdotool tool to get the coordination

$ xdotool getmouselocation --shell



now we have all the coordination of the needed filed let's have fun

3. Bot script

You can download the script from my Github

#! /bin/sh
# This BOT developed by IhebBenSAlem@ihebskiSoft 
# Read more about the topic visit :https://nodeme.blogspot.com
# ContactME:ihebbensalem.isetcom@gmail.com
echo "------B0T_RUN_NOW--------"
xdotool mousemove --sync 868 114 #(x,y) fb home page 
xdotool click 1 
sleep 2
xdotool mousemove --sync 536 211 #select the post form
xdotool click 1
sleep 2 #wait ,timeout of refresh 
#---- Inject the message or text--------#
xdotool key i 
xdotool key h
xdotool key e
xdotool key b
xdotool key s
xdotool key k
xdotool key i
xdotool key B
xdotool key 0
xdotool key t
xdotool key T
xdotool key 3
xdotool key S
xdotool key t
#-----END TXT --------#
sleep 2
xdotool mousemove --sync 718  274 # post button
xdotool click 1
clear
echo "[=======================] 100%"
echo "------Done ! --------"
now ,execute the bash file ,and here is it :D ,it works !

4.Security threads ?!

the reason behind this title that this method can be really dangerous ,if it's manipulated by hackers because the bash script simulates the legal peripherals of the computer (Mouse ,Keyboard) so ,the attack can not be detected by any protection software such as Antivirus ,Firewall ,IDS....IPS ..... or even the most advanced one with the latest updates ! .With the machine learning, this can be really dangerous because ,the machine can manipulate their self by just analyze the users behavior and this leads to getting some credential things or open ports , download files,malware from the internet or other .

5 .What's next ?!

now it is your turn to write some advanced bot through this basic script ,python have a dozen of libraries helps you to write the most sophisticated script to build powerful bots on the internet .This only the start

6. Note

THIS IS FOR EDUCATIONAL AND INFORMATIONAL PURPOSES ONLY.