390 likes | 409 Views
A news feed window From my phone 8/24/19 Not tech-specific Not a query about cybersecurity. Unifying concepts which will help us build a mental model o f the components and how they interact. The file and folders GUI metaphor, and how it relates to command line syntax
E N D
A news feed window From my phone 8/24/19 Not tech-specific Not a query about cybersecurity
Unifying concepts which will help us build a mental model of the components and how they interact • The file and folders GUI metaphor, and how it relates to command line syntax • A file is a stream of bytes, and everything is represented as a file • Files have meta-level information • The command line interface is alive and well • Files are arranged in trees (graphs) • A ready-to-run program is a process • The main interactive interface to the machine is called a shell • OS structure – sections 1, 2, 3 of the manual
Unifying concepts • A bit is a 1 or a 0 • A byte is a grouping of 8 bits • A file is a stream of bytes • Everything is a file • Files are arranged in trees (graphs)
computer processes in Files containing code or data memory hierarchy Humans via keyboard, mouse, joystick… Programs running here or across the network Static files code, data sensors out Humans via HID’s: display, Speakers, printers, actuators Other programs running here or elsewhere files
Ok, not the greatest graphic… but • A bit is a 1 or a 0 • A byte is a grouping of 8 bits • A file is a stream of bytes • Everything is a file Computers can read/write/manipulate 1’s and 0’s at an insanely fast rate using insanely tiny and dense storage devices + HID’s which operate beneath the level of human perception
Computers + I/O devices computer – something which implements a Turing Machine and which runs one or more stored programs I/O devices - something to assist in getting information to the computer/program + something to assist in displaying the information from it Human Interface Devices – when a human is the source/target of the I/O; push button, keyboard, mouse, display, speaker… Keyboard, terminal – the “command line” interface
HID’s can operate beneath the ability of human perception That car driving down the road is really just a video of a car driving down the road That video is really just a series of images flashed in front of you Each image is really just a series of pixels too close together to perceived individually Each white pixel is really a red, green, and blue dot very close to one another https://www.youtube.com/watch?v=hEbIWPArai4 https://www.google.com/search?q=highway+led+signs
I/O can also come from/go to nonhuman sources The output of one program can provide the input to another and vice versa String str; printf(“Enter some text> “); str = readLine(); //program blocks here waiting for a user to type something Enter some text>
printToSocket(“hello”); Or: string str; str = readSocket(); //program blocked waiting for a program on another computer to send something H e l l o network
Input can come from the environment via sensors, or output can go to the environment via actuators
Temperature sensor https://www.nxp.com/docs/en/data-sheet/LM75A.pdf
So we have computers, capable of pushing 1’s and 0’s around - a phenomenal number of them, at a phenomenal rate where everything – all the data, and the programs as well – is stored as 1’s and 0’s according to schemes almost exclusively implemented in software HID’s, which often need phenomenal amounts of 1’s and 0’s delivered at a phenomenal rate to maintain their illusion
Programming languages give you mental crutches myCharVariable = ‘A’; // you may think you are putting a capital letter ‘A’ into the variable, // but really you are setting the 8 bits of the variable to be // 0 1 0 0 0 0 0 1 // // (assuming a 1 byte C-like character type, and ASCII encoding
char array[10][20]; array[3][5] = ‘B’; //you may think there is some two dimensional structure in //memory and you’re putting a ‘B’ 4 columns over and 6 rows //down, but really the multidimensional array notion and bracket [] //subscripting is a mental crutch to avoid having to linearize your //thinking… and the ‘B’ is really: 0 1 0 0 0 0 1 0
Byte level model of the components • files • code data abstractions • text keyboard • html terminal • video process info tree • audio • images • for human consumption • for other code • HID’s interface with humans, operating beneath their perception • Files are streams of bytes with meta-information attached • Computers push bits around at incredible speeds and densities
Why this level of model? File operations are thus consistent across the whole game (almost)
Science is real, but not true, Math is true, but not real. - me Cave kids and quantum fields https://www.youtube.com/watch?v=zNVQfWC_evg
Not everything is a laptop Computers may run a single program, or be able to run a variety of programs The memory where a program resides may or may not be designed to be writable at run time A computer program may or may not interface with humans, the environment, both, neither Computers may or may not be connected to a network A network may or may not be wired
Somebody can walk in and just physically take/destroy/reboot/reimage your computers/storage/routers https://www.youtube.com/watch?v=rnmcRTnTNC8
Sitting at home I take control of a computer across the world working only over the network I achieve super-user status and run whatever programs I like Sort of a hacker holy grail By the size of botnets for hire, apparently not all that impossible to do
A thermostat for climate control in a room has an embedded computer which runs only a thermostat program. It is not networked in any way and the memory which holds the program is not writable. Still, I discover that while I am changing the temperature down, if I simultaneously push both the heat and A/C buttons, the units shuts off and the thermostat blanks out. I deny service to someone by exploiting a bug in the software.
Hardware advancements embedded systems often run *nix are network connected follow the model https://www.youtube.com/watch?v=B8DjTcANBx0?t=120s
Tricking people https://www.forbes.com/sites/billsinger/2012/05/15/feds-catch-their-illegal-limit-in-operation-phish-phry/#3b103d476265
But not you, not me? https://howsecureismypassword.net/
With such a broad landscape, heterogeneous, complex, and becoming more so, Where does our concern lie?
CIA (isn’t that clever? words are more true when they rhyme) Confidentiality Integrity Availability
Science is real, but not true, Math is true, but not real. - me Cave kids and quantum fields https://www.youtube.com/watch?v=zNVQfWC_evg