Only the educated are free...
Blacklabs Security Tutorials
  • About Me...
  • Site Disclaimer

Custom Banner in Linux Terminal

Link to KaliTutorials

Required Resources...

For this demonstration, we will need a Kali Linux system, Internet Access to obtain a package titled FIGlet and root access. 


FIGlet...

As per the FIGlet man page, FIGlet prints its input using large characters (called ``FIGcharac- ters'')made up of ordinary screen characters (called ``sub-charac- ters''). FIGlet can print in a variety of fonts, both left-to-right and right- to-left, with adjacent FIGcharacters kerned and ``smushed'' together in various ways. FIGlet fonts are stored in separate files, which can be identified by the suffix ``.flf''. FIGlet can also use ``control files'', which tell it to map certain input characters to certain other characters, similar to the Unix tr command. Complete details can be found here.

​

Demonstration in a nutshell...
  1. Boot Kali Linux with Internet Access
  2. Obtaing FIGlet with apt-get install
  3. Edit the bashrc file with our custom FIGlet Characters
  4. Launch bash and Confirm​

1. Boot Kali Linux with Internet Access
​

Boot Kali Linux and be sure to have Internet access. I am utilizing a VM and have placed the machine adapter in a Bridged" state.
VM Adapter in Bridged State

Once booted and authenticated, I will confirm access to the Internet by pinging Googles DNS server at 8.8.8.8.

Linux Commands
root@kali:~# ping 8.8.8.8
successful ping
Responses indicate we have Internet connectivity

2. Obtain FIGlet with apt-get install
​

We will use FIGlet to place our banner in the bashrc file. To do so, let's leverage apt-get install to obtain it through our repositories.

​root@kali:~# apt-get install figlet
apt-get install figlet command

Enter "Y" to accept the package installation. Install will complete and you will be returned to your root@kali:~# prompt.
completed install

3. Edit the bashrc file with our custom FIGlet Characters

Let's confirm FIGlet's functionality with the following command:


​root@kali:~# figlet "Hello World"
figlet output in terminal
ALL text in between the quotes will be converted to FIGcharacters
Basic options/switches to use with figlet:
  • man figlet will display the man page
  • showfigfonts will output font examples to terminal
  • -f allows you to specify the font to use for your output
    • ​​Example: figlet -f block "YourTextHere"
  • -c will center the output​
  • You can leverage figlet to display a day/time format to your terminal with the following:
    • watch -n1 "date '+%D%n%T'|figlet -k"​​
Day Time output with figlet
[crtl] + [c] to end and return to your terminal prompt

Explore the app and have some fun! But back to our purpose here...Let's edit the bash with a banner now!

​​root@kali:~# gedit /etc/bash.bashrc


use gedit to edit the bash.bashrc file
You WILL need root access the edit the file so you may need to proceed the command with sudo. 

​
​Head to the bottom of the file output and enter the following:


figlet "YourTextHere"

Then save the file and close the terminal.
​
gedit the bashrc file
Editing the document WILL require root access

4. Launch bash and Confirm!

Let's close out the terminal and confirm the banner has been added. 
​

Confirm Banner

That's it folks! Have fun!!!


Proudly powered by Weebly