Friday, March 10, 2017

terms


  • The Raspberry Pi is a series of small single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and in developing countries.
https://en.wikipedia.org/wiki/Raspberry_Pi


  • A UART (Universal Asynchronous Receiver/Transmitter) is the microchip with programming that controls a computer's interface to its attached serial devices.Specifically, it provides the computer with the RS-232C Data Terminal Equipment ( DTE ) interface so that it can "talk" to and exchange data with modems and other serial devices.
http://whatis.techtarget.com/definition/UART-Universal-Asynchronous-Receiver-Transmitter


  • The Universal Asynchronous Receiver/Transmitter (UART) controller is the key component of the serial communications subsystem of a computer. The UART takes bytes of data and transmits the individual bits in a sequential fashion. At the destination, a second UART re-assembles the bits into complete bytes.Serial transmission is commonly used with modems and for non-networked communication between computers, terminals and other devices.

There are two primary forms of serial transmission: Synchronous and Asynchronous.
    UART Universal Asynchronous Receiver/Transmitter
    USART Universal Synchronous-Asynchronous Receiver/Transmitter

Synchronous Serial Transmission
Synchronous serial transmission requires that the sender and receiver share a clock with one another, or that the sender provide a strobe or other timing signal so that the receiver knows when to “read” the next bit of the data.

Asynchronous Serial Transmission

Asynchronous transmission allows data to be transmitted without the sender having to send a clock signal to the receiver. Instead, the sender and receiver must agree on timing parameters in advance and special bits are added to each word which are used to synchronize the sending and receiving units.
https://www.freebsd.org/doc/en/articles/serial-uart/

network forensics

  • The Bro Network Security Monitor
Bro is a powerful network analysis framework that is much different from the typical IDS you may know
https://www.bro.org


  • GRR Rapid Response: remote live forensics for incident response
An incident response framework developed by security researchers at Google, the GRR framework analyzes specific workstations for malware footprints. Once both the server side and the agent have been deployed, they become GRR clients and can begin to receive messages from the front end servers, which makes it easy to investigate individual systems. Then the incident response team can perform various forensic tasks on the client machine, such as analyzing the memory, searching various settings and managing configuration options.
https://github.com/google/grr


  • Suricata

Suricata is a free and open source, mature, fast and robust network threat detection engine.
https://suricata-ids.org

  • NetScanTools® Pro
http://www.netscantools.com/nstpromain.html

Serial Port

  • Serial Terminal Basics

You can now use the screen command to to establish a simple serial connection.
The terminal will go blank with just a cursor. You are now connected to that port!
To disconnect, type control-a followed by control-\. The screen will then ask if you are sure you want to disconnect.

To be able to issue Serial commands, you must first enter PowerShell. Type powershell to get into PowerShell command mode.
To see a list of all the available COM ports, type
[System.IO.Ports.SerialPort]::getportnames()
Now create an instance of the port you want with this command
https://learn.sparkfun.com/tutorials/terminal-basics/command-line-windows-mac-linux

  • Using GNU screen to debug your serial port
Opening serial port (with the correct baud rate)
   
bash> screen /dev/ttyUSB0 57600
/dev/ttyUSB0 is the serial port, while 57600 sets its baud rate into 57600bps

https://embeddedfreak.wordpress.com/2008/08/12/using-gnu-screen-to-debug-your-serial-port/

  • Client Setup

1) Ensure you have a read/write permissions on /dev/ttyS0.
$ ls -l /dev/ttyS0
crw-rw---- 1 root dialout 4, 64 2007-12-20 13:56 /dev/ttyS0
$ id -Gn |grep dialout

if the last command didn't show an output add yourself to dialout group and logout/login:
sudo adduser $USER dialout


2) Install minicom
sudo apt-get install minicom

Configure minicom.
minicom -s

Configure client serial port settings: In Serial port setup, set the following options
A - Serial device: /dev/ttyS0
E - Bps/Par/Bits: 115200 8N1


Alternative serial client: screen

To install:
sudo apt-get install screen


To start:
screen /dev/ttyS0 115200

To end the session, use Ctrl-A,Shift-K.

https://help.ubuntu.com/community/SerialConsoleHowto


  • 5 Linux / Unix Commands For Connecting To The Serial Console

Find out information about your serial ports
$ dmesg | egrep --color 'serial|ttyS'

You can use setserial command which is designed to set and/or report the configuration information associated with a serial port:
$ setserial -g /dev/ttyS[0123]

The cu command is used to call up another system and act as a dial in terminal.
cu -l /dev/ttyS0 -s 19200

minicom command is a communication program which somewhat resembles the shareware program TELIX from old good MS-DOS days.

PuTTY is a free and open source gui X based terminal emulator client for the SSH, Telnet, rlogin, and raw TCP computing protocols and as a serial console clienPuTTY is a free and open source gui X based terminal emulator client for the SSH, Telnet, rlogin, and raw TCP computing protocols and as a serial console client.

The tip command is used as a serial terminal. tip command can be found under AIX/HP-UX/Solairs/*BSD/Linux operating systems.

if you forced to use MS-Windows, try the following free and open source serial communication programs:
    Putty
    TeraTerm
    Poderosa
https://www.cyberciti.biz/hardware/5-linux-unix-commands-for-connecting-to-the-serial-console/


  • Using the Raspberry Pi’s serial port
The stock Debian image for the Raspberry Pi uses the UART as a serial console.

I was able to connect to it from my Ubuntu laptop via my 3.3-volt USB FTDI TTL-232 cable. I connected Raspberry Pi’s ground pin to the ground pin of the FTDI, the Rasberry Pi’s TX pin to the FTDI’s RX pin and vice versa
Then on my Ubuntu laptop I installed minicom (sudo apt-get install minicom) and fired it up with:

    minicom -b 115200 -o -D /dev/ttyUSB0

http://www.irrational.net/2012/04/19/using-the-raspberry-pis-serial-port

  • Tutorial how to use adapter usb serial cable Ubuntu 14 04
https://www.youtube.com/watch?v=DXgvaibDJzo


  • I came across a problem recently, I needed to configure a Cisco switch and all I had was a Ubuntu machine that had a serial port. Since then I've got a Cisco 2511, with octal cable

dmesg | grep tty
the physical serial port is at ttyS0, where as usb > serial converters will show as ttyUSB0
http://lachlanmiskin.com/blog/2012/08/03/using-minicom-to-interface-with-serial-devices-on-linux

  • How to enable USB-Serial Port adapter (RS-232) in Ubuntu Linux

unplug the device and type “lsusb”
First plug in the USB-Serial Port adaptor to one of your USB port. Wait for a couple of second, then run “dmesg”.

Now we know the vendor id and the product id of the USB-Serial Port converter, this will enable us to load the linux kernel module “usbserial” to activate the device
sudo modprobe usbserial vendor=0x4348 product=0x5523
https://blog.mypapit.net/2008/05/how-to-use-usb-serial-port-converter-in-ubuntu.html

  • Testing a USB RS232 adapter
If  connected,  remove  the  USB  RS232  adapter.  In  Windows,  open  Device  Manager  and  expand  the  Ports  section.  While  Device  Manager 
is open  insert  the  USB  RS232  adapter  and  after  a  few  seconds  a  USB  Serial  Port  should  appear.  If  not,  there  is  a  problem  with  the  adapter  or driver
http://www.compsys1.com/support/docs/usb_rs232_test.pdf