This blog is an aggregate of clever questions and answers about Programming, Coding, and Algorithms. This is a safe place for programmers who are interested in optimizing their code, learning to code for the first time, or just want to be surrounded by the coding environment.
I think, the most common mistakes I witnessed or made myself when learning is:
1: Trying to memorize every language construction. Do not rely on your memory, use stackoverflow.
2: Spend a lot of time solving an issue yourself, before you google it. Just about every issue you can stumble upon, is in 99.99% cases already has been solved by someone else. Learn to properly search for solutions first.
3: Spending a couple of days on a task and realizing it was not worth it. If the time you spend on a single problem is more than halve an hour then you probably doing it wrong, search for alternatives.
4: Writing code from a scratch. Do not reinvent a bicycle, if you need to write a blog, just search a demo application in a language and a framework you chose, and build your logic on top of it. Need some other feature? Search another demo incorporating this feature, and use its code.
In programming you need to be smart, prioritize your time wisely. Diving in a deep loopholes will not earn you good money.
List of Freely available programming books – What is the single most influential book every Programmers should read
- Bjarne Stroustrup – The C++ Programming Language
- Brian W. Kernighan, Rob Pike – The Practice of Programming
- Donald Knuth – The Art of Computer Programming
- Ellen Ullman – Close to the Machine
- Ellis Horowitz – Fundamentals of Computer Algorithms
- Eric Raymond – The Art of Unix Programming
- Gerald M. Weinberg – The Psychology of Computer Programming
- James Gosling – The Java Programming Language
- Joel Spolsky – The Best Software Writing I
- Keith Curtis – After the Software Wars
- Richard M. Stallman – Free Software, Free Society
- Richard P. Gabriel – Patterns of Software
- Richard P. Gabriel – Innovation Happens Elsewhere
- Code Complete (2nd edition) by Steve McConnell
- The Pragmatic Programmer
- Structure and Interpretation of Computer Programs
- The C Programming Language by Kernighan and Ritchie
- Introduction to Algorithms by Cormen, Leiserson, Rivest & Stein
- Design Patterns by the Gang of Four
- Refactoring: Improving the Design of Existing Code
- The Mythical Man Month
- The Art of Computer Programming by Donald Knuth
- Compilers: Principles, Techniques and Tools by Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman
- Gödel, Escher, Bach by Douglas Hofstadter
- Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin
- Effective C++
- More Effective C++
- CODE by Charles Petzold
- Programming Pearls by Jon Bentley
- Working Effectively with Legacy Code by Michael C. Feathers
- Peopleware by Demarco and Lister
- Coders at Work by Peter Seibel
- Surely You’re Joking, Mr. Feynman!
- Effective Java 2nd edition
- Patterns of Enterprise Application Architecture by Martin Fowler
- The Little Schemer
- The Seasoned Schemer
- Why’s (Poignant) Guide to Ruby
- The Inmates Are Running The Asylum: Why High Tech Products Drive Us Crazy and How to Restore the Sanity
- The Art of Unix Programming
- Test-Driven Development: By Example by Kent Beck
- Practices of an Agile Developer
- Don’t Make Me Think
- Agile Software Development, Principles, Patterns, and Practices by Robert C. Martin
- Domain Driven Designs by Eric Evans
- The Design of Everyday Things by Donald Norman
- Modern C++ Design by Andrei Alexandrescu
- Best Software Writing I by Joel Spolsky
- The Practice of Programming by Kernighan and Pike
- Pragmatic Thinking and Learning: Refactor Your Wetware by Andy Hunt
- Software Estimation: Demystifying the Black Art by Steve McConnel
- The Passionate Programmer (My Job Went To India) by Chad Fowler
- Hackers: Heroes of the Computer Revolution
- Algorithms + Data Structures = Programs
- Writing Solid Code
- JavaScript – The Good Parts
- Getting Real by 37 Signals
- Foundations of Programming by Karl Seguin
- Computer Graphics: Principles and Practice in C (2nd Edition)
- Thinking in Java by Bruce Eckel
- The Elements of Computing Systems
- Refactoring to Patterns by Joshua Kerievsky
- Modern Operating Systems by Andrew S. Tanenbaum
- The Annotated Turing
- Things That Make Us Smart by Donald Norman
- The Timeless Way of Building by Christopher Alexander
- The Deadline: A Novel About Project Management by Tom DeMarco
- The C++ Programming Language (3rd edition) by Stroustrup
- Patterns of Enterprise Application Architecture
- Computer Systems – A Programmer’s Perspective
- Agile Principles, Patterns, and Practices in C# by Robert C. Martin
- Growing Object-Oriented Software, Guided by Tests
- Framework Design Guidelines by Brad Abrams
- Object Thinking by Dr. David West
- Advanced Programming in the UNIX Environment by W. Richard Stevens
- Hackers and Painters: Big Ideas from the Computer Age
- The Soul of a New Machine by Tracy Kidder
- CLR via C# by Jeffrey Richter
- The Timeless Way of Building by Christopher Alexander
- Design Patterns in C# by Steve Metsker
- Alice in Wonderland by Lewis Carol
- Zen and the Art of Motorcycle Maintenance by Robert M. Pirsig
- About Face – The Essentials of Interaction Design
- Here Comes Everybody: The Power of Organizing Without Organizations by Clay Shirky
- The Tao of Programming
- Computational Beauty of Nature
- Writing Solid Code by Steve Maguire
- Philip and Alex’s Guide to Web Publishing
- Object-Oriented Analysis and Design with Applications by Grady Booch
- Effective Java by Joshua Bloch
- Computability by N. J. Cutland
- Masterminds of Programming
- The Tao Te Ching
- The Productive Programmer
- The Art of Deception by Kevin Mitnick
- The Career Programmer: Guerilla Tactics for an Imperfect World by Christopher Duncan
- Paradigms of Artificial Intelligence Programming: Case studies in Common Lisp
- Masters of Doom
- Pragmatic Unit Testing in C# with NUnit by Andy Hunt and Dave Thomas with Matt Hargett
- How To Solve It by George Polya
- The Alchemist by Paulo Coelho
- Smalltalk-80: The Language and its Implementation
- Writing Secure Code (2nd Edition) by Michael Howard
- Introduction to Functional Programming by Philip Wadler and Richard Bird
- No Bugs! by David Thielen
- Rework by Jason Freid and DHH
- JUnit in Action
Source: Wikipedia
Hidden Features of C#
What are the most hidden features or tricks of C# that even C# fans, addicts, experts barely know?
Here are the revealed features so far:
Keywords
yield
by Michael Stumvar
by Michael Stumusing()
statement by kokosreadonly
by kokosas
by Mike Stoneas
/is
by Ed Swangrenas
/is
(improved) by Rocketpantsdefault
by deathofratsglobal::
by pzycomanusing()
blocks by AlexCusevolatile
by Jakub Šturcextern alias
by Jakub Šturc
Attributes
DefaultValueAttribute
by Michael StumObsoleteAttribute
by DannySmurfDebuggerDisplayAttribute
by StuDebuggerBrowsable
andDebuggerStepThrough
by bdukesThreadStaticAttribute
by marxidadFlagsAttribute
by Martin ClarkeConditionalAttribute
by AndrewBurns
Syntax
??
(coalesce nulls) operator by kokos- Number flaggings by Nick Berardi
where T:new
by Lars Mæhlum- Implicit generics by Keith
- One-parameter lambdas by Keith
- Auto properties by Keith
- Namespace aliases by Keith
- Verbatim string literals with @ by Patrick
enum
values by lfoust- @variablenames by marxidad
event
operators by marxidad- Format string brackets by Portman
- Property accessor accessibility modifiers by xanadont
- Conditional (ternary) operator (
?:
) by JasonS checked
andunchecked
operators by Binoj Antonyimplicit and explicit
operators by Flory
Language Features
- Nullable types by Brad Barker
- Anonymous types by Keith
__makeref __reftype __refvalue
by Judah Himango- Object initializers by lomaxx
- Format strings by David in Dakota
- Extension Methods by marxidad
partial
methods by Jon Erickson- Preprocessor directives by John Asbeck
DEBUG
pre-processor directive by Robert Durgin- Operator overloading by SefBkn
- Type inferrence by chakrit
- Boolean operators taken to next level by Rob Gough
- Pass value-type variable as interface without boxing by Roman Boiko
- Programmatically determine declared variable type by Roman Boiko
- Static Constructors by Chris
- Easier-on-the-eyes / condensed ORM-mapping using LINQ by roosteronacid
__arglist
by Zac Bowling
Visual Studio Features
- Select block of text in editor by Himadri
- Snippets by DannySmurf
Framework
TransactionScope
by KiwiBastardDependantTransaction
by KiwiBastardNullable<T>
by IainMHMutex
by DiagoSystem.IO.Path
by ageektrappedWeakReference
by Juan Manuel
Methods and Properties
String.IsNullOrEmpty()
method by KiwiBastardList.ForEach()
method by KiwiBastardBeginInvoke()
,EndInvoke()
methods by Will DeanNullable<T>.HasValue
andNullable<T>.Value
properties by RismoGetValueOrDefault
method by John Sheehan
Tips & Tricks
- Nice method for event handlers by Andreas H.R. Nilsson
- Uppercase comparisons by John
- Access anonymous types without reflection by dp
- A quick way to lazily instantiate collection properties by Will
- JavaScript-like anonymous inline-functions by roosteronacid
Other
- netmodules by kokos
- LINQBridge by Duncan Smart
- Parallel Extensions by Joel Coehoorn
- This isn’t C# per se, but I haven’t seen anyone who really uses
System.IO.Path.Combine()
to the extent that they should. In fact, the whole Path class is really useful, but no one uses it! - lambdas and type inference are underrated. Lambdas can have multiple statements and they double as a compatible delegate object automatically (just make sure the signature match) as in:
Console.CancelKeyPress +=
(sender, e) => {
Console.WriteLine("CTRL+C detected!\n");
e.Cancel = true;
};
- From Rick Strahl: You can chain the ?? operator so that you can do a bunch of null comparisons.
string result = value1 ?? value2 ?? value3 ?? String.Empty;
- From CLR via C#:
When normalizing strings, it is highly recommended that you use ToUpperInvariant instead of ToLowerInvariant because Microsoft has optimized the code for performing uppercase comparisons.
I remember one time my coworker always changed strings to uppercase before comparing. I’ve always wondered why he does that because I feel it’s more “natural” to convert to lowercase first. After reading the book now I know why.
- My favorite trick is using the null coalesce operator and parentheses to automagically instantiate collections for me.
private IList<Foo> _foo;
public IList<Foo> ListOfFoo
{ get { return _foo ?? (_foo = new List<Foo>()); } }
- Here are some interesting hidden C# features, in the form of undocumented C# keywords:
__makeref
__reftype
__refvalue
__arglist
These are undocumented C# keywords (even Visual Studio recognizes them!) that were added to for a more efficient boxing/unboxing prior to generics. They work in coordination with the System.TypedReference struct.
There’s also __arglist, which is used for variable length parameter lists.
One thing folks don’t know much about is System.WeakReference — a very useful class that keeps track of an object but still allows the garbage collector to collect it.
The most useful “hidden” feature would be the yield return keyword. It’s not really hidden, but a lot of folks don’t know about it. LINQ is built atop this; it allows for delay-executed queries by generating a state machine under the hood. Raymond Chen recently posted about the internal, gritty details.
- Using @ for variable names that are keywords.
var @object = new object();
var @string = "";
var @if = IpsoFacto();
- If you want to exit your program without calling any finally blocks or finalizers use FailFast:
Environment.FailFast()
Read more hidden C# Features at Hidden Features of C#? – Stack Overflow
Hidden Features of python
- Argument Unpacking
- Braces
- Chaining Comparison Operators
- Decorators
- Default Argument Gotchas / Dangers of Mutable Default arguments
- Descriptors
- Dictionary default
.get
value - Docstring Tests
- Ellipsis Slicing Syntax
- Enumeration
- For/else
- Function as iter() argument
- Generator expressions
import this
- In Place Value Swapping
- List stepping
__missing__
items- Multi-line Regex
- Named string formatting
- Nested list/generator comprehensions
- New types at runtime
.pth
files- ROT13 Encoding
- Regex Debugging
- Sending to Generators
- Tab Completion in Interactive Interpreter
- Ternary Expression
try/except/else
- Unpacking+
print()
function with
statement- Source: stackoverflow
Source: stackoveflow
What IDE to Use for Python
Acronyms used:
L - Linux
W - Windows
M - Mac
C - Commercial
F - Free
CF - Commercial with Free limited edition
? - To be confirmed
What is The right JSON content type?
For JSON text:
application/json
Example: { "Name": "Foo", "Id": 1234, "Rank": 7 }
For JSONP (runnable JavaScript) with callback:
application/javascript
Example: functionCall({"Name": "Foo", "Id": 1234, "Rank": 7});
Here are some blog posts that were mentioned in the relevant comments:
- Why you shouldn’t use
text/html
for JSON - Internet Explorer sometimes has issues with
application/json
- A rather complete list of Mimetypes and what to use them for
- The official mime type list at IANA from @gnrfan’s answer below
IANA has registered the official MIME Type for JSON as application/json
.
When asked about why not text/json
, Crockford seems to have said JSON is not really JavaScript nor text and also IANA was more likely to hand out application/*
than text/*
.
More resources:
JSON (JavaScript Object Notation) and JSONP (“JSON with padding”) formats seems to be very similar and therefore it might be very confusing which MIME type they should be using. Even though the formats are similar, there are some subtle differences between them.
So whenever in any doubts, I have a very simple approach (which works perfectly fine in most cases), namely, go and check corresponding RFC document.
JSON RFC 4627 (The application/json Media Type for JavaScript Object Notation (JSON)) is a specifications of JSON format. It says in section 6, that the MIME media type for JSON text is
application/json.
JSONP JSONP (“JSON with padding”) is handled different way than JSON, in a browser. JSONP is treated as a regular JavaScript script and therefore it should use application/javascript,
the current official MIME type for JavaScript. In many cases, however, text/javascript
MIME type will work fine too.
Note that text/javascript
has been marked as obsolete by RFC 4329 (Scripting Media Types) document and it is recommended to use application/javascript
type instead. However, due to legacy reasons, text/javascript
is still widely used and it has cross-browser support (which is not always a case with application/javascript
MIME type, especially with older browsers).
What are some mistakes to avoid while learning programming?
- Over use of the GOTO statement. Most schools teach this is a NO;NO
- Not commenting your code with proper documentation – what exactly does the code do??
- Endless LOOP. A structured loop that has NO EXIT point
- Overwriting memory – destroying data and/or code. Especially with Dynamic Allocation;Stacks;Queues
- Not following discipline – Requirements, Design, Code, Test, Implementation
Moreover complex code should have a BLUEPRINT – Design. That is like saying let’s build a house without a floor plan. Code/Programs that have a requirements and design specification BEFORE writing code tends to have a LOWER error rate. Less time debugging and fixing errors. Source: QUora
Lisp.
The thing that always struck me is that the best programmers I would meet or read all had a couple of things in common.
- They didn’t use IDEs, preferring Emacs or Vim.
- They all learned or used Functional Programming (Lisp, Haskel, Ocaml)
- They all wrote or endorsed some kind of testing, even if it’s just minimal TDD.
- They avoided fads and dependencies like a plague.
It is a basic truth that learning Lisp, or any functional programming, will fundamentally change the way you program and think about programming. Source: Quora
What are the Top 20 lesser known but cool data structures?
1- Tries, also known as prefix-trees or crit-bit trees, have existed for over 40 years but are still relatively unknown. A very cool use of tries is described in “TRASH – A dynamic LC-trie and hash data structure“, which combines a trie with a hash function.
2- Bloom filter: Bit array of m bits, initially all set to 0.
To add an item you run it through k hash functions that will give you k indices in the array which you then set to 1.
To check if an item is in the set, compute the k indices and check if they are all set to 1.
Of course, this gives some probability of false-positives (according to wikipedia it’s about 0.61^(m/n) where n is the number of inserted items). False-negatives are not possible.
Removing an item is impossible, but you can implement counting bloom filter, represented by array of ints and increment/decrement.
3- Rope: It’s a string that allows for cheap prepends, substrings, middle insertions and appends. I’ve really only had use for it once, but no other structure would have sufficed. Regular strings and arrays prepends were just far too expensive for what we needed to do, and reversing everthing was out of the question.
4- Skip lists are pretty neat.
Wikipedia
A skip list is a probabilistic data structure, based on multiple parallel, sorted linked lists, with efficiency comparable to a binary search tree (order log n average time for most operations).
They can be used as an alternative to balanced trees (using probalistic balancing rather than strict enforcement of balancing). They are easy to implement and faster than say, a red-black tree. I think they should be in every good programmers toolchest.
If you want to get an in-depth introduction to skip-lists here is a link to a video of MIT’s Introduction to Algorithms lecture on them.
Also, here is a Java applet demonstrating Skip Lists visually.
5– Spatial Indices, in particular R-trees and KD-trees, store spatial data efficiently. They are good for geographical map coordinate data and VLSI place and route algorithms, and sometimes for nearest-neighbor search.
Bit Arrays store individual bits compactly and allow fast bit operations.
6-Zippers – derivatives of data structures that modify the structure to have a natural notion of ‘cursor’ — current location. These are really useful as they guarantee indicies cannot be out of bound — used, e.g. in the xmonad window manager to track which window has focused.
Amazingly, you can derive them by applying techniques from calculus to the type of the original data structure!
7- Suffix tries. Useful for almost all kinds of string searching (http://en.wikipedia.org/wiki/Suffix_trie#Functionality). See also suffix arrays; they’re not quite as fast as suffix trees, but a whole lot smaller.
8- Splay trees (as mentioned above). The reason they are cool is threefold:
-
- They are small: you only need the left and right pointers like you do in any binary tree (no node-color or size information needs to be stored)
- They are (comparatively) very easy to implement
- They offer optimal amortized complexity for a whole host of “measurement criteria” (log n lookup time being the one everybody knows). See http://en.wikipedia.org/wiki/Splay_tree#Performance_theorems
9- Heap-ordered search trees: you store a bunch of (key, prio) pairs in a tree, such that it’s a search tree with respect to the keys, and heap-ordered with respect to the priorities. One can show that such a tree has a unique shape (and it’s not always fully packed up-and-to-the-left). With random priorities, it gives you expected O(log n) search time, IIRC.
10- A niche one is adjacency lists for undirected planar graphs with O(1) neighbour queries. This is not so much a data structure as a particular way to organize an existing data structure. Here’s how you do it: every planar graph has a node with degree at most 6. Pick such a node, put its neighbors in its neighbor list, remove it from the graph, and recurse until the graph is empty. When given a pair (u, v), look for u in v’s neighbor list and for v in u’s neighbor list. Both have size at most 6, so this is O(1).
By the above algorithm, if u and v are neighbors, you won’t have both u in v’s list and v in u’s list. If you need this, just add each node’s missing neighbors to that node’s neighbor list, but store how much of the neighbor list you need to look through for fast lookup.
11-Lock-free alternatives to standard data structures i.e lock-free queue, stack and list are much overlooked.
They are increasingly relevant as concurrency becomes a higher priority and are much more admirable goal than using Mutexes or locks to handle concurrent read/writes.
Here’s some links
http://www.cl.cam.ac.uk/research/srg/netos/lock-free/
http://www.research.ibm.com/people/m/michael/podc-1996.pdf [Links to PDF]
http://www.boyet.com/Articles/LockfreeStack.html
Mike Acton’s (often provocative) blog has some excellent articles on lock-free design and approaches
12- I think Disjoint Set is pretty nifty for cases when you need to divide a bunch of items into distinct sets and query membership. Good implementation of the Union and Find operations result in amortized costs that are effectively constant (inverse of Ackermnan’s Function, if I recall my data structures class correctly).
13- Fibonacci heaps
They’re used in some of the fastest known algorithms (asymptotically) for a lot of graph-related problems, such as the Shortest Path problem. Dijkstra’s algorithm runs in O(E log V) time with standard binary heaps; using Fibonacci heaps improves that to O(E + V log V), which is a huge speedup for dense graphs. Unfortunately, though, they have a high constant factor, often making them impractical in practice.
14- Anyone with experience in 3D rendering should be familiar with BSP trees. Generally, it’s the method by structuring a 3D scene to be manageable for rendering knowing the camera coordinates and bearing.
Binary space partitioning (BSP) is a method for recursively subdividing a space into convex sets by hyperplanes. This subdivision gives rise to a representation of the scene by means of a tree data structure known as a BSP tree.
In other words, it is a method of breaking up intricately shaped polygons into convex sets, or smaller polygons consisting entirely of non-reflex angles (angles smaller than 180°). For a more general description of space partitioning, see space partitioning.
Originally, this approach was proposed in 3D computer graphics to increase the rendering efficiency. Some other applications include performing geometrical operations with shapes (constructive solid geometry) in CAD, collision detection in robotics and 3D computer games, and other computer applications that involve handling of complex spatial scenes.
15- Huffman trees – used for compression.
16- Have a look at Finger Trees, especially if you’re a fan of the previously mentioned purely functional data structures. They’re a functional representation of persistent sequences supporting access to the ends in amortized constant time, and concatenation and splitting in time logarithmic in the size of the smaller piece.
As per the original article:
Our functional 2-3 finger trees are an instance of a general design technique in- troduced by Okasaki (1998), called implicit recursive slowdown. We have already noted that these trees are an extension of his implicit deque structure, replacing pairs with 2-3 nodes to provide the flexibility required for efficient concatenation and splitting.
A Finger Tree can be parameterized with a monoid, and using different monoids will result in different behaviors for the tree. This lets Finger Trees simulate other data structures.
17- Circular or ring buffer– used for streaming, among other things.
18- I’m surprised no one has mentioned Merkle trees (ie. Hash Trees).
Used in many cases (P2P programs, digital signatures) where you want to verify the hash of a whole file when you only have part of the file available to you.
19- <zvrba> Van Emde-Boas trees
I think it’d be useful to know why they’re cool. In general, the question “why” is the most important to ask 😉
My answer is that they give you O(log log n) dictionaries with {1..n} keys, independent of how many of the keys are in use. Just like repeated halving gives you O(log n), repeated sqrting gives you O(log log n), which is what happens in the vEB tree.
20- An interesting variant of the hash table is called Cuckoo Hashing. It uses multiple hash functions instead of just 1 in order to deal with hash collisions. Collisions are resolved by removing the old object from the location specified by the primary hash, and moving it to a location specified by an alternate hash function. Cuckoo Hashing allows for more efficient use of memory space because you can increase your load factor up to 91% with only 3 hash functions and still have good access time.
Honorable mentions: splay trees, Cuckoo Hashing, min-max heap, Cache Oblivious datastructures, Left Leaning Red-Black Trees, Work Stealing Queue, Bootstrapped skew-binomial heaps , Kd-Trees, MX-CIF Quadtrees, HAMT, Inverted Index, Fenwick Tree, Ball Tress, Van Emde-Boas trees. Nested sets , half-edge data structure , Scapegoat trees, unrolled linked list, 2-3 Finger Trees, Pairing heaps , Interval Trees, XOR Linked List, Binary decision diagram, The Region Quadtree, treaps, Counted unsorted balanced btrees, Arne Andersson trees , DAWGs , BK-Trees, or Burkhard-Keller Trees , Zobrist Hashing, Persistent Data Structures, B* tree, Deletable Bloom Filters (DlBF)
Ring-Buffer, Skip lists, Priority deque, Ternary Search Tree, FM-index, PQ-Trees, sparse matrix data structures, Delta list/delta queue, Bucket Brigade, Burrows–Wheeler transform , corner-stitched data structure. Disjoint Set Forests, Binomial heap, Cycle Sort
What and where are the stack and the heap?
- Where and what are they (physically in a real computer’s memory)?
- To what extent are they controlled by the OS or language run-time?
- What is their scope?
- What determines the size of each of them?
- What makes one faster?
The stack is the memory set aside as scratch space for a thread of execution. When a function is called, a block is reserved on the top of the stack for local variables and some bookkeeping data. When that function returns, the block becomes unused and can be used the next time a function is called. The stack is always reserved in a LIFO (last in first out) order; the most recently reserved block is always the next block to be freed. This makes it really simple to keep track of the stack; freeing a block from the stack is nothing more than adjusting one pointer.
The heap is memory set aside for dynamic allocation. Unlike the stack, there’s no enforced pattern to the allocation and deallocation of blocks from the heap; you can allocate a block at any time and free it at any time. This makes it much more complex to keep track of which parts of the heap are allocated or free at any given time; there are many custom heap allocators available to tune heap performance for different usage patterns.
Each thread gets a stack, while there’s typically only one heap for the application (although it isn’t uncommon to have multiple heaps for different types of allocation).
To answer your questions directly:
To what extent are they controlled by the OS or language runtime?
The OS allocates the stack for each system-level thread when the thread is created. Typically the OS is called by the language runtime to allocate the heap for the application.
What is their scope?
The stack is attached to a thread, so when the thread exits the stack is reclaimed. The heap is typically allocated at application startup by the runtime, and is reclaimed when the application (technically process) exits.
What determines the size of each of them?
The size of the stack is set when a thread is created. The size of the heap is set on application startup, but can grow as space is needed (the allocator requests more memory from the operating system).
What makes one faster?
The stack is faster because the access pattern makes it trivial to allocate and deallocate memory from it (a pointer/integer is simply incremented or decremented), while the heap has much more complex bookkeeping involved in an allocation or deallocation. Also, each byte in the stack tends to be reused very frequently which means it tends to be mapped to the processor’s cache, making it very fast. Another performance hit for the heap is that the heap, being mostly a global resource, typically has to be multi-threading safe, i.e. each allocation and deallocation needs to be – typically – synchronized with “all” other heap accesses in the program.
A clear demonstration:
Image source: vikashazrati.wordpress.com
Stack:
- Stored in computer RAM just like the heap.
- Variables created on the stack will go out of scope and are automatically deallocated.
- Much faster to allocate in comparison to variables on the heap.
- Implemented with an actual stack data structure.
- Stores local data, return addresses, used for parameter passing.
- Can have a stack overflow when too much of the stack is used (mostly from infinite or too deep recursion, very large allocations).
- Data created on the stack can be used without pointers.
- You would use the stack if you know exactly how much data you need to allocate before compile time and it is not too big.
- Usually has a maximum size already determined when your program starts.
Heap:
- Stored in computer RAM just like the stack.
- In C++, variables on the heap must be destroyed manually and never fall out of scope. The data is freed with
delete
,delete[]
, orfree
. - Slower to allocate in comparison to variables on the stack.
- Used on demand to allocate a block of data for use by the program.
- Can have fragmentation when there are a lot of allocations and deallocations.
- In C++ or C, data created on the heap will be pointed to by pointers and allocated with
new
ormalloc
respectively. - Can have allocation failures if too big of a buffer is requested to be allocated.
- You would use the heap if you don’t know exactly how much data you will need at run time or if you need to allocate a lot of data.
- Responsible for memory leaks.
Example:
int foo()
{
char *pBuffer; //<--nothing allocated yet (excluding the pointer itself, which is allocated here on the stack).
bool b = true; // Allocated on the stack.
if(b)
{
//Create 500 bytes on the stack
char buffer[500];
//Create 500 bytes on the heap
pBuffer = new char[500];
}//<-- buffer is deallocated here, pBuffer is not
}//<--- oops there's a memory leak, I should have called delete[] pBuffer;
he most important point is that heap and stack are generic terms for ways in which memory can be allocated. They can be implemented in many different ways, and the terms apply to the basic concepts.
-
In a stack of items, items sit one on top of the other in the order they were placed there, and you can only remove the top one (without toppling the whole thing over).
The simplicity of a stack is that you do not need to maintain a table containing a record of each section of allocated memory; the only state information you need is a single pointer to the end of the stack. To allocate and de-allocate, you just increment and decrement that single pointer. Note: a stack can sometimes be implemented to start at the top of a section of memory and extend downwards rather than growing upwards.
-
In a heap, there is no particular order to the way items are placed. You can reach in and remove items in any order because there is no clear ‘top’ item.
Heap allocation requires maintaining a full record of what memory is allocated and what isn’t, as well as some overhead maintenance to reduce fragmentation, find contiguous memory segments big enough to fit the requested size, and so on. Memory can be deallocated at any time leaving free space. Sometimes a memory allocator will perform maintenance tasks such as defragmenting memory by moving allocated memory around, or garbage collecting – identifying at runtime when memory is no longer in scope and deallocating it.
These images should do a fairly good job of describing the two ways of allocating and freeing memory in a stack and a heap. Yum!
-
To what extent are they controlled by the OS or language runtime?
As mentioned, heap and stack are general terms, and can be implemented in many ways. Computer programs typically have a stack called a call stack which stores information relevant to the current function such as a pointer to whichever function it was called from, and any local variables. Because functions call other functions and then return, the stack grows and shrinks to hold information from the functions further down the call stack. A program doesn’t really have runtime control over it; it’s determined by the programming language, OS and even the system architecture.
A heap is a general term used for any memory that is allocated dynamically and randomly; i.e. out of order. The memory is typically allocated by the OS, with the application calling API functions to do this allocation. There is a fair bit of overhead required in managing dynamically allocated memory, which is usually handled by the runtime code of the programming language or environment used.
-
What is their scope?
The call stack is such a low level concept that it doesn’t relate to ‘scope’ in the sense of programming. If you disassemble some code you’ll see relative pointer style references to portions of the stack, but as far as a higher level language is concerned, the language imposes its own rules of scope. One important aspect of a stack, however, is that once a function returns, anything local to that function is immediately freed from the stack. That works the way you’d expect it to work given how your programming languages work. In a heap, it’s also difficult to define. The scope is whatever is exposed by the OS, but your programming language probably adds its rules about what a “scope” is in your application. The processor architecture and the OS use virtual addressing, which the processor translates to physical addresses and there are page faults, etc. They keep track of what pages belong to which applications. You never really need to worry about this, though, because you just use whatever method your programming language uses to allocate and free memory, and check for errors (if the allocation/freeing fails for any reason).
-
What determines the size of each of them?
Again, it depends on the language, compiler, operating system and architecture. A stack is usually pre-allocated, because by definition it must be contiguous memory. The language compiler or the OS determine its size. You don’t store huge chunks of data on the stack, so it’ll be big enough that it should never be fully used, except in cases of unwanted endless recursion (hence, “stack overflow”) or other unusual programming decisions.
A heap is a general term for anything that can be dynamically allocated. Depending on which way you look at it, it is constantly changing size. In modern processors and operating systems the exact way it works is very abstracted anyway, so you don’t normally need to worry much about how it works deep down, except that (in languages where it lets you) you mustn’t use memory that you haven’t allocated yet or memory that you have freed.
-
What makes one faster?
The stack is faster because all free memory is always contiguous. No list needs to be maintained of all the segments of free memory, just a single pointer to the current top of the stack. Compilers usually store this pointer in a special, fast register for this purpose. What’s more, subsequent operations on a stack are usually concentrated within very nearby areas of memory, which at a very low level is good for optimization by the processor on-die caches.
- Both the stack and the heap are memory areas allocated from the underlying operating system (often virtual memory that is mapped to physical memory on demand).
- In a multi-threaded environment each thread will have its own completely independent stack but they will share the heap. Concurrent access has to be controlled on the heap and is not possible on the stack.
The heap
- The heap contains a linked list of used and free blocks. New allocations on the heap (by
new
ormalloc
) are satisfied by creating a suitable block from one of the free blocks. This requires updating the list of blocks on the heap. This meta information about the blocks on the heap is also stored on the heap often in a small area just in front of every block. - As the heap grows new blocks are often allocated from lower addresses towards higher addresses. Thus you can think of the heap as a heap of memory blocks that grows in size as memory is allocated. If the heap is too small for an allocation the size can often be increased by acquiring more memory from the underlying operating system.
- Allocating and deallocating many small blocks may leave the heap in a state where there are a lot of small free blocks interspersed between the used blocks. A request to allocate a large block may fail because none of the free blocks are large enough to satisfy the allocation request even though the combined size of the free blocks may be large enough. This is called heap fragmentation.
- When a used block that is adjacent to a free block is deallocated the new free block may be merged with the adjacent free block to create a larger free block effectively reducing the fragmentation of the heap.
The stack
- The stack often works in close tandem with a special register on the CPU named the stack pointer. Initially the stack pointer points to the top of the stack (the highest address on the stack).
- The CPU has special instructions for pushing values onto the stack and popping them off the stack. Each push stores the value at the current location of the stack pointer and decreases the stack pointer. A pop retrieves the value pointed to by the stack pointer and then increases the stack pointer (don’t be confused by the fact that adding a value to the stack decreases the stack pointer and removing a value increases it. Remember that the stack grows to the bottom). The values stored and retrieved are the values of the CPU registers.
- If a function has parameters, these are pushed onto the stack before the call to the function. The code in the function is then able to navigate up the stack from the current stack pointer to locate these values.
- When a function is called the CPU uses special instructions that push the current instruction pointer onto the stack, i.e. the address of the code executing on the stack. The CPU then jumps to the function by setting the instruction pointer to the address of the function called. Later, when the function returns, the old instruction pointer is popped off the stack and execution resumes at the code just after the call to the function.
- When a function is entered, the stack pointer is decreased to allocate more space on the stack for local (automatic) variables. If the function has one local 32 bit variable four bytes are set aside on the stack. When the function returns, the stack pointer is moved back to free the allocated area.
- Nesting function calls work like a charm. Each new call will allocate function parameters, the return address and space for local variables and these activation records can be stacked for nested calls and will unwind in the correct way when the functions return.
- As the stack is a limited block of memory, you can cause a stack overflow by calling too many nested functions and/or allocating too much space for local variables. Often the memory area used for the stack is set up in such a way that writing below the bottom (the lowest address) of the stack will trigger a trap or exception in the CPU. This exceptional condition can then be caught by the runtime and converted into some kind of stack overflow exception.
Can a function be allocated on the heap instead of a stack?
No, activation records for functions (i.e. local or automatic variables) are allocated on the stack that is used not only to store these variables, but also to keep track of nested function calls.
How the heap is managed is really up to the runtime environment. C uses malloc
and C++ uses new
, but many other languages have garbage collection.
However, the stack is a more low-level feature closely tied to the processor architecture. Growing the heap when there is not enough space isn’t too hard since it can be implemented in the library call that handles the heap. However, growing the stack is often impossible as the stack overflow only is discovered when it is too late; and shutting down the thread of execution is the only viable option.
In the following C# code
public void Method1()
{
int i = 4;
int y = 2;
class1 cls1 = new class1();
}
Here’s how the memory is managed
Local Variables
that only need to last as long as the function invocation go in the stack. The heap is used for variables whose lifetime we don’t really know up front but we expect them to last a while. In most languages it’s critical that we know at compile time how large a variable is if we want to store it on the stack.
Objects (which vary in size as we update them) go on the heap because we don’t know at creation time how long they are going to last. In many languages the heap is garbage collected to find objects (such as the cls1 object) that no longer have any references.
In Java, most objects go directly into the heap. In languages like C / C++, structs and classes can often remain on the stack when you’re not dealing with pointers.
More information can be found here:
The difference between stack and heap memory allocation « timmurphy.org
and here:
Creating Objects on the Stack and Heap
This article is the source of picture above: Six important .NET concepts: Stack, heap, value types, reference types, boxing, and unboxing – CodeProject
but be aware it may contain some inaccuracies.
The Stack When you call a function the arguments to that function plus some other overhead is put on the stack. Some info (such as where to go on return) is also stored there. When you declare a variable inside your function, that variable is also allocated on the stack.
Deallocating the stack is pretty simple because you always deallocate in the reverse order in which you allocate. Stack stuff is added as you enter functions, the corresponding data is removed as you exit them. This means that you tend to stay within a small region of the stack unless you call lots of functions that call lots of other functions (or create a recursive solution).
The Heap The heap is a generic name for where you put the data that you create on the fly. If you don’t know how many spaceships your program is going to create, you are likely to use the new (or malloc or equivalent) operator to create each spaceship. This allocation is going to stick around for a while, so it is likely we will free things in a different order than we created them.
Thus, the heap is far more complex, because there end up being regions of memory that are unused interleaved with chunks that are – memory gets fragmented. Finding free memory of the size you need is a difficult problem. This is why the heap should be avoided (though it is still often used).
Implementation Implementation of both the stack and heap is usually down to the runtime / OS. Often games and other applications that are performance critical create their own memory solutions that grab a large chunk of memory from the heap and then dish it out internally to avoid relying on the OS for memory.
This is only practical if your memory usage is quite different from the norm – i.e for games where you load a level in one huge operation and can chuck the whole lot away in another huge operation.
Physical location in memory This is less relevant than you think because of a technology called Virtual Memory which makes your program think that you have access to a certain address where the physical data is somewhere else (even on the hard disc!). The addresses you get for the stack are in increasing order as your call tree gets deeper. The addresses for the heap are un-predictable (i.e implimentation specific) and frankly not important.
In Short
A stack is used for static memory allocation and a heap for dynamic memory allocation, both stored in the computer’s RAM.
In Detail
The Stack
The stack is a “LIFO” (last in, first out) data structure, that is managed and optimized by the CPU quite closely. Every time a function declares a new variable, it is “pushed” onto the stack. Then every time a function exits, all of the variables pushed onto the stack by that function, are freed (that is to say, they are deleted). Once a stack variable is freed, that region of memory becomes available for other stack variables.
The advantage of using the stack to store variables, is that memory is managed for you. You don’t have to allocate memory by hand, or free it once you don’t need it any more. What’s more, because the CPU organizes stack memory so efficiently, reading from and writing to stack variables is very fast.
More can be found here.
The Heap
The heap is a region of your computer’s memory that is not managed automatically for you, and is not as tightly managed by the CPU. It is a more free-floating region of memory (and is larger). To allocate memory on the heap, you must use malloc() or calloc(), which are built-in C functions. Once you have allocated memory on the heap, you are responsible for using free() to deallocate that memory once you don’t need it any more.
If you fail to do this, your program will have what is known as a memory leak. That is, memory on the heap will still be set aside (and won’t be available to other processes). As we will see in the debugging section, there is a tool called Valgrind that can help you detect memory leaks.
Unlike the stack, the heap does not have size restrictions on variable size (apart from the obvious physical limitations of your computer). Heap memory is slightly slower to be read from and written to, because one has to use pointers to access memory on the heap. We will talk about pointers shortly.
Unlike the stack, variables created on the heap are accessible by any function, anywhere in your program. Heap variables are essentially global in scope.
More can be found here.
Variables allocated on the stack are stored directly to the memory and access to this memory is very fast, and its allocation is dealt with when the program is compiled. When a function or a method calls another function which in turns calls another function, etc., the execution of all those functions remains suspended until the very last function returns its value. The stack is always reserved in a LIFO order, the most recently reserved block is always the next block to be freed. This makes it really simple to keep track of the stack, freeing a block from the stack is nothing more than adjusting one pointer.
Variables allocated on the heap have their memory allocated at run time and accessing this memory is a bit slower, but the heap size is only limited by the size of virtual memory. Elements of the heap have no dependencies with each other and can always be accessed randomly at any time. You can allocate a block at any time and free it at any time. This makes it much more complex to keep track of which parts of the heap are allocated or free at any given time.
You can use the stack if you know exactly how much data you need to allocate before compile time, and it is not too big. You can use the heap if you don’t know exactly how much data you will need at runtime or if you need to allocate a lot of data.
In a multi-threaded situation each thread will have its own completely independent stack, but they will share the heap. The stack is thread specific and the heap is application specific. The stack is important to consider in exception handling and thread executions.
Each thread gets a stack, while there’s typically only one heap for the application (although it isn’t uncommon to have multiple heaps for different types of allocation).
At run-time, if the application needs more heap, it can allocate memory from free memory and if the stack needs memory, it can allocate memory from free memory allocated memory for the application.
Even, more detail is given here and here.
Now come to your question’s answers.
To what extent are they controlled by the OS or language runtime?
The OS allocates the stack for each system-level thread when the thread is created. Typically the OS is called by the language runtime to allocate the heap for the application.
More can be found here.
What is their scope?
Already given in top.
“You can use the stack if you know exactly how much data you need to allocate before compile time, and it is not too big. You can use the heap if you don’t know exactly how much data you will need at runtime or if you need to allocate a lot of data.”
More can be found in here.
What determines the size of each of them?
The size of the stack is set by OS when a thread is created. The size of the heap is set on application startup, but it can grow as space is needed (the allocator requests more memory from the operating system).
What makes one faster?
Stack allocation is much faster since all it really does is move the stack pointer. Using memory pools, you can get comparable performance out of heap allocation, but that comes with a slight added complexity and its own headaches.
Also, stack vs. heap is not only a performance consideration; it also tells you a lot about the expected lifetime of objects.
Details can be found from here.
How do you stop scripters from slamming your website hundreds of times a second?
How about implementing something like SO does with the CAPTCHAs?
If you’re using the site normally, you’ll probably never see one. If you happen to reload the same page too often, post successive comments too quickly, or something else that triggers an alarm, make them prove they’re human. In your case, this would probably be constant reloads of the same page, following every link on a page quickly, or filling in an order form too fast to be human.
If they fail the check x times in a row (say, 2 or 3), give that IP a timeout or other such measure. Then at the end of the timeout, dump them back to the check again.
Since you have unregistered users accessing the site, you do have only IPs to go on. You can issue sessions to each browser and track that way if you wish. And, of course, throw up a human-check if too many sessions are being (re-)created in succession (in case a bot keeps deleting the cookie).
As far as catching too many innocents, you can put up a disclaimer on the human-check page: “This page may also appear if too many anonymous users are viewing our site from the same location. We encourage you to register or login to avoid this.” (Adjust the wording appropriately.)
Besides, what are the odds that X people are loading the same page(s) at the same time from one IP? If they’re high, maybe you need a different trigger mechanism for your bot alarm.
Edit: Another option is if they fail too many times, and you’re confident about the product’s demand, to block them and make them personally CALL you to remove the block.
Having people call does seem like an asinine measure, but it makes sure there’s a human somewhere behind the computer. The key is to have the block only be in place for a condition which should almost never happen unless it’s a bot (e.g. fail the check multiple times in a row). Then it FORCES human interaction – to pick up the phone.
In response to the comment of having them call me, there’s obviously that tradeoff here. Are you worried enough about ensuring your users are human to accept a couple phone calls when they go on sale? If I were so concerned about a product getting to human users, I’d have to make this decision, perhaps sacrificing a (small) bit of my time in the process.
Since it seems like you’re determined to not let bots get the upper hand/slam your site, I believe the phone may be a good option. Since I don’t make a profit off your product, I have no interest in receiving these calls. Were you to share some of that profit, however, I may become interested. As this is your product, you have to decide how much you care and implement accordingly.
The other ways of releasing the block just aren’t as effective: a timeout (but they’d get to slam your site again after, rinse-repeat), a long timeout (if it was really a human trying to buy your product, they’d be SOL and punished for failing the check), email (easily done by bots), fax (same), or snail mail (takes too long).
You could, of course, instead have the timeout period increase per IP for each time they get a timeout. Just make sure you’re not punishing true humans inadvertently.
Performance optimization strategies as a last resort
Let’s assume:
- the code already is working correctly
- the algorithms chosen are already optimal for the circumstances of the problem
- the code has been measured, and the offending routines have been isolated
- all attempts to optimize will also be measured to ensure they do not make matters worse
OK, you’re defining the problem to where it would seem there is not much room for improvement. That is fairly rare, in my experience. I tried to explain this in a Dr. Dobbs article in November 1993, by starting from a conventionally well-designed non-trivial program with no obvious waste and taking it through a series of optimizations until its wall-clock time was reduced from 48 seconds to 1.1 seconds, and the source code size was reduced by a factor of 4. My diagnostic tool was this. The sequence of changes was this:
-
The first problem found was use of list clusters (now called “iterators” and “container classes”) accounting for over half the time. Those were replaced with fairly simple code, bringing the time down to 20 seconds.
-
Now the largest time-taker is more list-building. As a percentage, it was not so big before, but now it is because the bigger problem was removed. I find a way to speed it up, and the time drops to 17 seconds.
-
Now it is harder to find obvious culprits, but there are a few smaller ones that I can do something about, and the time drops to 13 sec.
Now I seem to have hit a wall. The samples are telling me exactly what it is doing, but I can’t seem to find anything that I can improve. Then I reflect on the basic design of the program, on its transaction-driven structure, and ask if all the list-searching that it is doing is actually mandated by the requirements of the problem.
Then I hit upon a re-design, where the program code is actually generated (via preprocessor macros) from a smaller set of source, and in which the program is not constantly figuring out things that the programmer knows are fairly predictable. In other words, don’t “interpret” the sequence of things to do, “compile” it.
- That redesign is done, shrinking the source code by a factor of 4, and the time is reduced to 10 seconds.
Now, because it’s getting so quick, it’s hard to sample, so I give it 10 times as much work to do, but the following times are based on the original workload.
-
More diagnosis reveals that it is spending time in queue-management. In-lining these reduces the time to 7 seconds.
-
Now a big time-taker is the diagnostic printing I had been doing. Flush that – 4 seconds.
-
Now the biggest time-takers are calls to malloc and free. Recycle objects – 2.6 seconds.
-
Continuing to sample, I still find operations that are not strictly necessary – 1.1 seconds.
Total speedup factor: 43.6
Now no two programs are alike, but in non-toy software I’ve always seen a progression like this. First you get the easy stuff, and then the more difficult, until you get to a point of diminishing returns. Then the insight you gain may well lead to a redesign, starting a new round of speedups, until you again hit diminishing returns. Now this is the point at which it might make sense to wonder whether ++i
or i++
or for(;;)
or while(1)
are faster: the kinds of questions I see so often on Stack Overflow.
P.S. It may be wondered why I didn’t use a profiler. The answer is that almost every one of these “problems” was a function call site, which stack samples pinpoint. Profilers, even today, are just barely coming around to the idea that statements and call instructions are more important to locate, and easier to fix, than whole functions.
I actually built a profiler to do this, but for a real down-and-dirty intimacy with what the code is doing, there’s no substitute for getting your fingers right in it. It is not an issue that the number of samples is small, because none of the problems being found are so tiny that they are easily missed.
ADDED: jerryjvl requested some examples. Here is the first problem. It consists of a small number of separate lines of code, together taking over half the time:
/* IF ALL TASKS DONE, SEND ITC_ACKOP, AND DELETE OP */
if (ptop->current_task >= ILST_LENGTH(ptop->tasklist){
. . .
/* FOR EACH OPERATION REQUEST */
for ( ptop = ILST_FIRST(oplist); ptop != NULL; ptop = ILST_NEXT(oplist, ptop)){
. . .
/* GET CURRENT TASK */
ptask = ILST_NTH(ptop->tasklist, ptop->current_task)
These were using the list cluster ILST (similar to a list class). They are implemented in the usual way, with “information hiding” meaning that the users of the class were not supposed to have to care how they were implemented. When these lines were written (out of roughly 800 lines of code) thought was not given to the idea that these could be a “bottleneck” (I hate that word). They are simply the recommended way to do things. It is easy to say in hindsight that these should have been avoided, but in my experience all performance problems are like that. In general, it is good to try to avoid creating performance problems. It is even better to find and fix the ones that are created, even though they “should have been avoided” (in hindsight). I hope that gives a bit of the flavor.
Here is the second problem, in two separate lines:
/* ADD TASK TO TASK LIST */
ILST_APPEND(ptop->tasklist, ptask)
. . .
/* ADD TRANSACTION TO TRANSACTION QUEUE */
ILST_APPEND(trnque, ptrn)
These are building lists by appending items to their ends. (The fix was to collect the items in arrays, and build the lists all at once.) The interesting thing is that these statements only cost (i.e. were on the call stack) 3/48 of the original time, so they were not in fact a big problem at the beginning. However, after removing the first problem, they cost 3/20 of the time and so were now a “bigger fish”. In general, that’s how it goes.
I might add that this project was distilled from a real project I helped on. In that project, the performance problems were far more dramatic (as were the speedups), such as calling a database-access routine within an inner loop to see if a task was finished.
REFERENCE ADDED: The source code, both original and redesigned, can be found in www.ddj.com, for 1993, in file 9311.zip, files slug.asc and slug.zip.
EDIT 2011/11/26: There is now a SourceForge project containing source code in Visual C++ and a blow-by-blow description of how it was tuned. It only goes through the first half of the scenario described above, and it doesn’t follow exactly the same sequence, but still gets a 2-3 order of magnitude speedup.
Suggestions:
- Pre-compute rather than re-calculate: any loops or repeated calls that contain calculations that have a relatively limited range of inputs, consider making a lookup (array or dictionary) that contains the result of that calculation for all values in the valid range of inputs. Then use a simple lookup inside the algorithm instead.
Down-sides: if few of the pre-computed values are actually used this may make matters worse, also the lookup may take significant memory. - Don’t use library methods: most libraries need to be written to operate correctly under a broad range of scenarios, and perform null checks on parameters, etc. By re-implementing a method you may be able to strip out a lot of logic that does not apply in the exact circumstance you are using it.
Down-sides: writing additional code means more surface area for bugs. - Do use library methods: to contradict myself, language libraries get written by people that are a lot smarter than you or me; odds are they did it better and faster. Do not implement it yourself unless you can actually make it faster (i.e.: always measure!)
- Cheat: in some cases although an exact calculation may exist for your problem, you may not need ‘exact’, sometimes an approximation may be ‘good enough’ and a lot faster in the deal. Ask yourself, does it really matter if the answer is out by 1%? 5%? even 10%?
Down-sides: Well… the answer won’t be exact.
When you can’t improve the performance any more – see if you can improve the perceived performance instead.
You may not be able to make your fooCalc algorithm faster, but often there are ways to make your application seem more responsive to the user.
A few examples:
- anticipating what the user is going to request and start working on that before then
- displaying results as they come in, instead of all at once at the end
- Accurate progress meter
These won’t make your program faster, but it might make your users happier with the speed you have.
I spend most of my life in just this place. The broad strokes are to run your profiler and get it to record:
- Cache misses. Data cache is the #1 source of stalls in most programs. Improve cache hit rate by reorganizing offending data structures to have better locality; pack structures and numerical types down to eliminate wasted bytes (and therefore wasted cache fetches); prefetch data wherever possible to reduce stalls.
- Load-hit-stores. Compiler assumptions about pointer aliasing, and cases where data is moved between disconnected register sets via memory, can cause a certain pathological behavior that causes the entire CPU pipeline to clear on a load op. Find places where floats, vectors, and ints are being cast to one another and eliminate them. Use
__restrict
liberally to promise the compiler about aliasing. - Microcoded operations. Most processors have some operations that cannot be pipelined, but instead run a tiny subroutine stored in ROM. Examples on the PowerPC are integer multiply, divide, and shift-by-variable-amount. The problem is that the entire pipeline stops dead while this operation is executing. Try to eliminate use of these operations or at least break them down into their constituent pipelined ops so you can get the benefit of superscalar dispatch on whatever the rest of your program is doing.
- Branch mispredicts. These too empty the pipeline. Find cases where the CPU is spending a lot of time refilling the pipe after a branch, and use branch hinting if available to get it to predict correctly more often. Or better yet, replace branches with conditional-moves wherever possible, especially after floating point operations because their pipe is usually deeper and reading the condition flags after fcmp can cause a stall.
- Sequential floating-point ops. Make these SIMD.
And one more thing I like to do:
- Set your compiler to output assembly listings and look at what it emits for the hotspot functions in your code. All those clever optimizations that “a good compiler should be able to do for you automatically”? Chances are your actual compiler doesn’t do them. I’ve seen GCC emit truly WTF code.
More suggestions:
-
Avoid I/O: Any I/O (disk, network, ports, etc.) is always going to be far slower than any code that is performing calculations, so get rid of any I/O that you do not strictly need.
-
Move I/O up-front: Load up all the data you are going to need for a calculation up-front, so that you do not have repeated I/O waits within the core of a critical algorithm (and maybe as a result repeated disk seeks, when loading all the data in one hit may avoid seeking).
-
Delay I/O: Do not write out your results until the calculation is over, store them in a data structure and then dump that out in one go at the end when the hard work is done.
-
Threaded I/O: For those daring enough, combine ‘I/O up-front’ or ‘Delay I/O’ with the actual calculation by moving the loading into a parallel thread, so that while you are loading more data you can work on a calculation on the data you already have, or while you calculate the next batch of data you can simultaneously write out the results from the last batch.
I love all the
- graph algorithms in particular the Bellman Ford Algorithm
- Scheduling algorithms the Round-Robin scheduling algorithm in particular.
- Dynamic Programming algorithms the Knapsack fractional algorithm in particular.
- Backtracking algorithms the 8-Queens algorithm in particular.
- Greedy algorithms the Knapsack 0/1 algorithm in particular.
We use all these algorithms in our daily life in various forms at various places.
For example every shopkeeper applies anyone or more of the several scheduling algorithms to service his customers. Depending upon his service policy and situation. No one of the scheduling algorithm fits all the situations.
All of us mentally apply one of the graph algorithms when we plan the shortest route to be taken when we go out for doing multiple things in one trip.
All of us apply one of the Greedy algorithms while selecting career, job, girlfriends, friends etc.
All of us apply one of the Dynamic programming algorithms when we do simple multiplication mentally by referring to the various mathematical products table in our memory.
How much faster is C compared to Python?
Which sorting algorithm does Python Sorted use?
It uses TimSort, a sort algorithm which was invented by Tim Peters, and is now used in other languages such as Java.
TimSort is a complex algorithm which uses the best of many other algorithms, and has the advantage of being stable – in others words if two elements A & B are in the order A then B before the sort algorithm and those elements test equal during the sort, then the algorithm Guarantees that the result will maintain that A then B ordering.
That does mean for example if you want to say order a set of student scores by score and then name (so equal scores are ordered already alphabetically) then you can sort by name and then sort by score.
TimSort has good performance against data sets which are partially sorted or already sorted (areas where some other algorithms struggle).
Run Your Python Code Online Here
I’m currently coding a SAT solver algorithm that will have to take millions of input data, and I was wondering if I should switch from Python to C.
Answer: Using best-of-class equivalent algorithms optimized compiled C code is often multiple orders of magnitude faster than Python code interpreted by CPython (the main Python implementation). Other Python implementations (like PyPy) might be a bit better, but not vastly so. Some computations fit Python better, but I have a feeling that a SAT solver implementation will not be competitive if written using Python.
All that said, do you need to write a new implementation? Could you use one of the excellent ones out there? CDCL implementations often do a good job, and there are various open-source ones readily available (e.g., this one: https://github.com/togatoga/togasat
Comments:
1- I mean, also it depends. I recall seeing an analysis some time ago, that showed CPython can be as fast as C … provided you are almost exclusively using library functions written in C. That being said, for any non-trivial python program it will probably be the case that you must spend quite a bit of time in the interpreter, and not in C library functions.

The dot operator’s left hand operand is an object reference, which is needed for the access to contextualize with said object’s state.
The double colon operator has two uses in this case:
- Access to a static class member.
- Access to a parent class member (needs the context of a running method which can be static or not).
Why Rust?
There are two main reasons: performance and familiarity. While Rust has been shown to be faster than C++, it’s not as fast as assembly language—and many developers have been working in assembly for so long that they’re not willing to give it up.
However, there’s another reason why some developers are sticking with C++: compiler optimization.
C++ compilers are more intelligent than Rust compilers when it comes to optimizing code for performance, so if you’re looking for top-notch performance from your application, then you might want to stick with C++ until the Rust compiler has caught up.
The C++ programming language definition is written in English and in other human languages. Programming language definitions are written for humans to read. They are not written in programming languages.
An actual implementation of a C++ compiler (or interpreter) can be written in any general-purpose programming language. Some are written in C, some are written in C++, some are written in other programming languages. Some are written with the help of compiler development tools and infrastructure (e.g., lex, yacc, flex, bison, antlr, LLVM, etc.). It just depends on the specific C++ implementation you’re looking at.
This is true of all high-level programming languages. Any general-purpose programming language can be used to implement a compiler or interpreter, no matter what programming language you are compiling or interpreting.
Learn other languages. It will broaden your perspective and hopefully make you a better developer.
Alan Perlis, one of the developers of ALGOL, once said, “A language that doesn’t affect the way you think about programming, is not worth knowing.”
Conversely, that implies learning other languages can and will affect the way you think about programming, provided you get some variety of exposure.
C++ is a multiparadigm language. But if you haven’t had exposure to those paradigms in a more focused setting, you might not understand the value they bring, or their strengths, weaknesses, idioms, and insights.
So even if you do the bulk of your programming in C++, you may not be using it the most effective way possible.
I know I personally have gaps, because I haven’t explored certain paradigms myself. I owe it to myself to at least dip my toe in some of them. I know this, because every time I learn a new language or environment, I sense a gap closing—a gap I may not have been aware of previously.
You don’t even need to spend a lot of time to gain value, either. I may have only spent a week with Scala, for example, but I learned more than just the base language from it. I hadn’t really encountered fold and match expressions as such basic and integral concepts, for example.
And despite its negative reputation, I found Perl to be an excellent language to learn about multiple programming techniques.
Mark Jason Dominus’ Higher Order Perl opened my eyes a number of techniques that I believe originated more from the LISP world.
Example: Partial Function Application
In Perl, you can implement partial function application (sometimes conflated with the related concept currying) with you eyes closed and one hand behind your back. Suppose I want to bind the first argument of foo()
:
- my $f = sub { return foo(arg1, @_); };
Now I can invoke $f
as a function with that first argument bound, with a slight syntax tweak: &$f(…)
or $f->(…)
. I don’t even need to think about the rest.
Trying to learn about that for the first time in C++ likely would have lost the forest for the trees.
C++98 was quite primitive. It offered std::bind1st
and std::bind2nd
for 2-argument function objects only. Boost offered boost::bind
,[1] which had its own limitations. And because these were relatively uncommon, they were unfamiliar to many C++ users (at least among the crowd I was in). C++ lambdas (introduced with C++11) help, but they don’t work for arbitrary arguments until C++14. For that, you probably need parameter packs, forwarding references, and std::forward
.[2] And then there’s object lifetimes to consider, so for your bound arguments you might need to trade off between copy, move, capturing a reference, smart pointers,[3][4] etc. Oh, and finally, it won’t yield a function pointer, but rather an function object, so it’s not usable in places that need a pure function pointer. Although, if it manages to be capture-less, it can provide a pure function pointer by applying unary +
to it…
Can you see how you might lose the forest for the trees here?
If you didn’t already have some idea of the usefulness of partial application, would you even try? If you hadn’t encountered the concept before, would it have even come to mind when you saw lambdas?
Punchline
In practice, if you’re already well versed in C++, it’s not actually all that difficult to implement techniques like partial application in C++. You’re already accustomed to the rigamarole described above, since C++ confronts you with those sorts of decisions regularly.
It does cloud things noticeably, however. Learning the concepts in a simpler environment separates you from the implementation noise.
Learn other languages and become a more rounded and hopefully better developer. Step away from C++’s innumerable trees of details to see different areas of the forest more clearly.
Footnotes
In C++, how can a template object be deleted with or without the delete keyword? (template <class T> class Obj;)
If you allocated it with new
, then delete it by passing the pointer to delete
, just like any other pointer. There’s nothing particularly special about a pointer to an object whose type happens to be a template.
Most of the time, though, you shouldn’t be calling new
and delete
directly.
See: https://youtu.be/JfmTagWcqoE
When should “new” be used in C++?
new’s use should be confined to very narrow use-cases. Examples of use cases where new is ok:
- Writing low-level memory management code such as allocators and deallocators, smart pointers, etc.
- Working with code/libraries that uses outdated C++ programming idioms like QT — but then narrowly limited to the extent necessary to work with QT
- You are going to need to preallocate an object to pass to an API that indicates it will assume ownership of (i.e. responsibility for deleting the object and delete). If you are going to work with that object at all before passing it off, you should not use new. (use a unique pointer and call .release(), when calling the API).
The way to dynamically allocate memory correctly in modern C++ is std::make_unique or std::make_shared. The first returns a unique_pointer to the allocated object (which will delete the object for you when it goes out of scope) or std::shared_pointer which can be copied around — the object will be deleted for you when there are no more copies of the shared pointer.
Why do array indexes start with 0 (zero) in many programming languages?
Array indices should start at 0. This is not just an efficiency hack for ancient computers, or a reflection of the underlying memory model, or some other kind of historical accident—forget all of that. Zero-based indexing actually simplifies array-related math for the programmer, and simpler math leads to fewer bugs. Here are some examples.
- Suppose you’re writing a hash table that maps each integer key to one of
n
buckets. If your array of buckets is indexed starting at 0, you can writebucket = key mod n
; but if it’s indexed starting at 1, you have to writebucket = (key mod n) + 1
. - Suppose you’re writing code to serialize a rectangular array of pixels, with width
w
and heighth
, to a file (which we’ll think of as a one-dimensional array of lengthw*h
). With 0-indexed arrays, pixel (x
,y
) goes into positiony*w + x
; with 1-indexed arrays, pixel (x
,y
) goes into positiony*w + x - w
. - Suppose you want to put the letters
‘A’
through‘Z’
into an array of length 26, and you have a functionord
that maps a character to its ASCII value. With 0-indexed arrays, the characterc
is put at indexord(c) - ord(‘A’)
; with 1-indexed arrays, it’s put at indexord(c) - ord(‘A’) + 1
.
It’s in fact one-based indexing that’s the historical accident—human languages needed numbers for “first”, “second”, etc. before we had invented zero. For a practical example of the kinds of problems this accident leads to, consider how the 1800s—well, no, actually, the period from January 1, 1801 through December 31, 1900—came to be known as the “19th century”.
No, almost no one uses Python libraries for machine learning.
Before you start listing counterexamples, notice the emphasized words. Yes, a lot of people use Python for machine learning, because it allows for very fast prototyping and overall exploration of problem space, but none of the libraries they are using for it are actually written in Python. Indeed, they are almost always written in either Fortran or C++ instead, and just interface with Python through some thin wrapper.
The slowness of Python is completely irrelevant if the only thing you do with it is invoking a library function written in highly-optimized C++.
Python’s a great language, but I’m going to mention a few reasons why you might choose Java:
- It’s fast, handles multithreaded well, and scales.
- It’s built for security.
- It has a great ecosystem. (Which includes a deep learning library I work on.)
- Many companies have bet their stack on Java, so there’s demand for Java programmers.
- The JVM is cross-platform, and uses run-time information to manage itself.
- It takes care of memory management.
- Java 8 has lambda expressions, and includes an impl of Javascript called Nashorn that runs on the JVM.
- Static typing: Java is typesafe, and its static typing is essentially a form of self-documenting code.
- Java is mature: It’s been around for 20 years, it’s fully backward compatible, and code written decades ago still works.
- Android: Java 7 works on the world’s largest mobile OS.
For those and other reasons, Java is one of the world’s most widely used languages. Oracle says there are 10 million Java programmers worldwide. The Github stats from Eduardo Bonet speak volumes.
It’s a basic programming skills challenge.
If you understand loops, variables and conditionals only, that’s enough to hack out a FizzBuzz. If you’re a bit further along the path, you can write a cleaner FizzBuzz
The challenge itself is about writing fizz and buzz when a number is exactly divisible by 3 or 5. It’s not really important, except that it steers you to use those elements of programming above.
It can be done in any language as those concepts are foundational to every language.
Let me open with a quote that you’ve probably seen many times:
premature optimization is the root of all evil.
— Donald Knuth
- Programs are regularly gigantic. If you profile a program that isn’t fast enough, you’ll often find histograms that shows the top 1,000 functions all taking well under 0.1% of the execution time. “Optimizing” those 1,000 functions is usually not practical and would likely not achieve the desired speedup anyway.
- The number of executed instructions is often relatively irrelevant. Instead, the number of cache misses is far more critical, but it’s also much harder to locate them. Avoiding cache misses is something that may require design work up front, because it affects core data structures.
- Machines are highly heterogeneous, and extracting performance is not just a matter of dealing with the main CPU cores (which may not be homogeneous!), but also to arrange for efficient use of vector units, and accelerators like GPUs, media co-processors, and neural engines. Utilizing all those units is also something that may require design work up front.
- Performance is not just a matter of execution time. It’s also a matter of energy consumption and scalability. And response time: More than ever, software is interactive, and yet has to deal with new kinds of latencies (e.g., from networking).
- Software is an independent industry: If your version 1.0 is too slow, or uses to much battery life, or chokes your data center, you might not get a chance at developing an optimized version 1.5. (In 1974, software was mostly an add-on to hardware.)
- Software is built from independent components: While developing a specific component, you might not know just how hard it will be pushed. If you don’t design for performance from the start you may end up painting yourself into a corner.
All that to say that Knuth’ quote should be taken for what it is: Don’t optimize local instruction counts early on. But don’t skip thinking about optimizing design and data structures from the start, because if performance matters in any way (throughput, latency, energy use, or scalability) it’s something that’s difficult or impossible to “retrofit”. Things to think about:
- How will you evaluate performance? How will you track it during the development and maintenance process?
- How can you avoid computation that’s not needed? This might mean to architect for “lazy evaluation”.
- How will you lay out your data for efficient access (i.e., make best use of the memory hierarchy)?
- How will you organize your algorithms and data structures to take advantage of the available computational resources?
- When considering algorithms, what regime will they work in? A traditional example: “Fast” sorting algorithms are typically only preferable once there are enough elements (often 50+) to sort; if you know that you’ll be repeatedly sorting a dozen elements, those algorithms may not be your best option.
- Are the complexities introduced to achieve better performance worth their overall (negative?) impact on the project?
When all that is handled adequately, you might eventually have to deal with “nitty gritty code optimization”, and it will have a chance to be meaningful.
Now, regarding the original question:
What do most programmers do (when optimizing code) that is essentially wrong?
I don’t think that’s generalizable. I think Knuth’s quote is often mis-construed… but I wouldn’t say that “most programmers” do that. I’m not even sure that “most programmers” optimize code at all. I also think that Knuth’s quote is often ignored, and that’s not great either… but again, I’d venture that it doesn’t involve “most programmers”. Programmers are a very diverse bunch, with many diverse roles, working on a great diversity of projects that may or may not have concrete performance constraints.
In other words, I think the question has no meaningful answer.
Finally, I’d like to close with a quote from the late Len Lattanzi (whom I had the pleasure of having as a colleague for a few years):
Belated pessimization is the leaf of no good.
— Len Lattanzi
Pros and Cons of Java vs Node vs .Net, Which stack should I go for, .NET, Node, or Java?
Umm, that’s really up to you. But there are some tradeoffs.
Java:
Pros:
Extremely widely used. You’ll never want for a job if you are good at it. Other languages (Scala, Kotlin, Groovy) run on the JVM as well. There is a lot of cool big data processing that you can use Java for (Apache Spark, Hadoop, etc.).
Cons:
Tons of bloatware (WebSphere, WebLogic, Adobe Experience Manager) runs on Java. You’re likely to end up coding up some legacy enterprise garbage. UIs written in Java are crap at best.
.NET:
Pros:
Well supported by Microsoft. Visual Studio is gorgeous.
Cons:
Not so many open source libraries, you’ll likely be coding for Windows. This means that your development machine will be Windows (dealbreaker for me). Also, no cool little startup will use .NET ever. Not as many jobs as Java. UIs written in .NET are crap at best.
Node.js
Pros:
Much more concise and faster to develop for than either .NET or Java. Almost as many open source libraries as there are for Java.
Cons:
Memory management, thread management, and overall performance aren’t as good as Java or .NET. You’ll have a harder time finding a Node.js job unless you also know a client side JS framework such as Vue.js or React.js. In that case, you’ll be very much in demand.
Others:
If you want to stick to server side coding, you should consider RUST and Golang. Both are more performant than any of the above. Benchmarks I’ve read suggest that RUST is overall more performant but that Golang has better concurrency management.
- Inside another object that wraps them
- Two methods returning one object each
- pass in two objects as collaborating parameters so methods can be called on them
The second way is good in OO. You do your calculation once, store the two results as state in an object, use two separate accessors in the calling code.
Do all pointers have the same size in C++?
Theoretically, no. Not even for a given system. A char*
may have a size different from an int*
.
In practice, yes.
First, note that all pointers to object types (as opposed to function types) must be able to round-trip through void*
(modulo cv-qualification). So if different object pointer types had different sizes, void*
would have to be as large as the largest of them.
Second, for pointers to object types there aren’t many potential advantages to having them be of different size. Why make things complex if they can be made simple at no perceivable cost?
Third… plenty of reasonable code “out there” assumes that all pointers have the same size. So building an implementation where that’s not the case handicaps that implementation right out of the gate.
For function pointers it may actually sometimes be interesting from a performance point of view to give them twice the size of ordinary pointers, because they may have to encapsulate both the address of the function and the address of the associated data segment (in shared library models where a separate data segment is created for every shared library instance). However, because of compatibility considerations even those implementations just add an indirection to keep the function pointers compatible with void*
(even though function pointers are not strictly required by the standard to round-trip through void*
).
- Try it and measure it
- On the scale of bad programming, if is at the bottom of the list.
Compilers are very smart about these things. as an example, consider the alternatives
Both compile to the exact same code sequence, which does NOT include a branch:
Source code is supposed to be a way to express your intent to the computer. You really should write the source to be as clear as possible and leave the microoptimizations to the compiler. Once you get the program working and correct, then you can look at performance. Use profiling tools to figure out where the time is going and speed up the parts that are slow AND where being slow actually matters.
By the way, you shouldn’t be afraid of branches either. The branch prediction logic in modern processors is nearly telepathic. AMD is using neural nets inside the chip (!). The predictors will correctly guess what is going to happen more than 90% of the time.
What does strongly typed mean in programming?
The other answers are mistaken. This is a very common confusion. They describe statically typed language, not strongly typed language. There is a big difference.
Strongly typed vs weakly typed:
In strongly typed languages you get an error if the types do not match in an expression. It does not matter if the type is determined at compile time (static types) or runtime (dynamic types).
Both java and python are strongly typed. In both languages, you get an error if you try to add objects with unmatching types. For example, in python, you get an error if you try to add a number and a string:
- >>> a = 10
- >>> b = “hello”
- >>> a + b
- Traceback (most recent call last):
- File “<stdin>”, line 1, in <module>
- TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’
In Python, you get this error at runtime. In Java, you would get a similar error at compile time. Most statically typed languages are also strongly typed.
The opposite of strongly typed language is weakly typed. In a weakly typed language, there are implicit type conversions. Instead of giving you an error, it will convert one of the values automatically and produce a result, even if such conversion loses data. This often leads to unexpected and unpredictable behavior.
Javascript is an example of a weakly typed language.
- > let a = 10
- > let b = “hello”
- > a + b
- ’10hello’
Instead of an error, JavaScript will convert a to string and then concatenate the strings.
Static types vs dynamic types:
In a statically typed language, variables are bound types and may only hold data of that type. Typically you declare variables and specify the type of data that the variable has. In some languages, the type can be deduced from what you assign to it, but it still holds that the variable is bound to that type. For example, in java:
- int a = 3;
- a = “hello” // Error, a can only contain integers
in a dynamically typed language, variables may hold any type of data. The type of the data is simply determined by what gets assigned to the variable at runtime. Python is dynamically typed, for example:
- a = 10
- a = “hello”
- # no problem, a first held an integer and then a string
Comments:
#1: Don’t confuse strongly typed with statically typed.
Python is dynamically typed and strongly typed.
Javascript is dynamically typed and weakly typed.
Java is statically typed and strongly typed.
C is statically typed and weekly typed.
See these articles for a longer explanation:
Magic lies here – Statically vs Dynamically Typed Languages
Key differences between mainly used languages for data science
I also added a drawing that illustrates how strong and static typing relate to each other:
Python is dynamically typed because types are determined at runtime. The opposite of dynamically typed is statically typed (not strongly typed)
Python is strongly typed because it will give errors when types don’t match instead of performing implicit conversion. The opposite of strongly typed is weakly typed
Python is strongly typed and dynamically typed
What is the difference between finalize() and destructor in Java?
Finalize() is not guaranteed to be called and the programmer has no control over what time or in what order finalizers are called.
They are useless and should be ignored.
A destructor is not part of Java. It is a C++ language feature with very precise definitions of when it will be called.
Comments:
1- Until we got to languages like Rust (with the Drop trait) and a few others was C++ the only language which had the destructor as a concept? I feel like other languages were inspired from that.
2- Many others manage memory for you, even predating C: COBOL, FORTRAN and so on. That’s another driver why there isn’t much attention to destructors
What are some ways to avoid writing static helper classes in Java?
Mainly getting out of that procedural ‘function operates on parameters passed in’ mindset.
Tactically, the static can normally be moved onto one of the parameter objects. Or all the parameters become an object that the static moves to. A new object might be needed. Once done the static is now a fully fledged method on an object and is not static anymore.
I view this as a positive iterative step in discovering objects for a system.
For cases where a static makes sense (? none come to mind) then a good practice is to move it closer to where it is used either in the same package or on a class that is strongly related.
I avoid having global ‘Utils’ classes full of statics that are unrelated. That’s fairly basic design, keeping unrelated things separate. In this case, the SOLID ISP principle applies: segregate into smaller, more focused interfaces.
Is there any programming language as easy as python and as fast and efficient as C++, if yes why it’s not used very often instead of C or C++ in low level programming like embedded systems, AAA 2D and 3D video games, or robotic?
Not really. I use Python occasionally for “quick hacks” – programs that I’ll probably run once and then delete – also, because I use “blender” for 3D modeling and Python is it’s scripting language.
I used to write quite a bit of JavaScript for web programming but since WASM came along and allows me to run C++ at very nearly full speed inside a web browser, I write almost zero JavaScript these days.
I use C++ for almost everything.
Once you get to know C++ it’s no harder than Python – the main thing I find great about Python is the number of easy-to-find libraries.
But in AAA games – the poor performance of Python pretty much rules it out.
In embedded systems, the computer is generally too small to fit a Python interpreter into memory – so C or C++ is a more likely choice.
Typescript vs JavaScript: Similarities and Differences
JavaScript is a scripting language, that was developed by EMCA’s Technical Committee and Brendan Eich. It works perfectly in web-browsers without the help of any web-server or a compiler. It allows you to change HTML and CSS in the browsers without a full page reload. That is why it is used to create dynamic and interactive web pages.
TypeScript is a superset of the JavaScript language. It was presented and developed by Microsoft technical fellow Anders Hejlsberg in 2012. Typescript has appeared for a certain reason: the more JavaScript grew, the heavier and more unreadable js code became. It turned up especially evident when developers started to use JavaScript for server-side technologies.
TypeScript is an open-source language that has a compiler, that converts TypeScript code to JavaScript code (see TypeScript playground service). That compiler is cross-browser and also open-source. To start using TypeScript, you can rename your .js files to .ts files, and if there are no logical mistakes in the js code, you get valid TypeScript code. So, TypeScript code Is JavaScript code (and vice versa) just with some additions. To learn more about those additions, watch the original video presentation of TypeScript. Meanwhile, we discuss the key differences between JS and TS in 2022.

I think TypeScript *is* pretty popular, within the constraints it has.
Node.js is 1.8% of websites, and TypeScript is seldom used outside of Node.js. That really means TypeScript has limited potential for use there.
You can use TypeScript on the client-side, but it can be a pain to set up, and unless you have quite a lot of client-side logic, it might not be worth it.
Personally, I think TypeScript on the client-side is well worth the effort, but not really worth it on the server side, where there are so many options outside of a JS runtime.
I don’t think anybody says JavaScript is a dead language. I think its long term future is pretty bleak though, for two reasons:
- TypeScript.
- WebAssembly.
The entire Internet doesn’t run on JavaScript, in fact hardly any of it does, what you mean is the *web*. The web and the Internet are two different things, and while JavaScript is of course ubiquitous in web sites, practically no Internet infrastructure is using JavaScript.
If you consider the Internet to be the road infrastructure and cars, the web is the screaming babies in the back seats.
Unless you can write really good TypeScript code, you’re probably better off sticking to JavaScript – if you have that option of course.
The main advantage of JS vs TS in an interview is that equivalent code will be much quicker to write with JS, as you don’t have to write type annotations and what not. The time that you have to spend mechanically writing code is not negligible and time is off the essence.
Then again, the better you are at TypeScript, the less this will make a difference. Also, in TypeScript there are more ways to write functionally equivalent code, so when you’re really great at TS you’re more susceptible to pick the very best way to express what you want to do, so your expertise and good coding style is more evident. Finally, with good TS you should be able to avoid writing some tests that may be necessary in JS, and your coding style is naturally more defensive, which is good.
Of those, TypeScript/Node.js/React is an easy answer. Though I’d also strongly recommend TypeScript on the frontend as well. If you skip Redux and instead use React Hooks you should find that TypeScript is a good fit.
But I wouldn’t use MySQL. PostgreSQL is stronger on almost every axis at this point, and given the lack of specificity of the purpose of the web site, I wouldn’t even necessarily recommend PostgreSQL over a half dozen other types of database.
Listen, if you want to design a web site such that it can grow, you need to make key technology choices strategically. If you’re using PostgreSQL, you can nearly seamlessly switch to CockroachDB, for instance, for much easier distributed database performance. Unless your database needs support for Geo-indexing, in which case you might need to split data between CockroachDB and MongoDB (edit: CockroachDB added Geo-index support!). Or if your website would benefit from a graph database, maybe OrientDB would be best.
Designing a website architecture is something that should be done by experienced experts. And the design goes deeper than just the technology choices. You need an architect who knows how to coordinate the architecture and the data flow your specific app will require. Otherwise you could paint yourself into a corner and end up with a site that’s failing at load with no easy path to fixing it, just at the point when your users are asking for more features.
A common cop-out inspired by the agile community is to claim that you just “ignore” the design and optimize later, but the truth is that many services that rely on that approach simply fail when they start to get traction.
Ironically, given your list of companies to be like, Facebook largely succeeded because a previous successful competitor, Friendster, couldn’t keep up with its expansion. The architecture had too many bottlenecks for them to scale horizontally, and they started hemorrhaging users by the thousands when the users found the site to be unresponsive too often. So if you want to be a Facebook, then plan for scaling from the start; otherwise the odds are good you’ll be a Friendster instead.
Not that Facebook necessarily planned it out in advance. I suspect they were instead just lucky. But “being lucky” isn’t a business plan.
A few good ones:
- Java + Spring Boot
- C# .NET
- Node + Express + Typescript
- Go
Can’t go wrong with any of those, really. I personally don’t care too much for the Node solution, but it’s plenty capable (if you can stomach that whole JS ecosystem thing)
What is a simple C++ program to find the average of 2 numbers?
This was actually one of the interview questions I got when I applied at Google.
“Write a function that returns the average of two number.”
So I did, they way you would expect. (x+y)/2. I did it as a C++ template so it works for any kind of number.
interviewer: “What’s wrong with it?”
Well, I suppose there could be an overflow if adding the two numbers requires more than space than the numeric type can hold. So I rewrote it as (x/2) + (y/2).
interviewer: “What’s wrong with it now?”
Well, I think we are losing a little precision by pre-dividing. So I wrote it another way.
interviewer: “What’s wrong with it now?”
And that went on for about 10 minutes. It ended with us talking about the heat death of the universe.
I got the job and ended up working with the guy. He said he had never done that before. He had just wanted to see what would happen.
Comments:
1-
The big problem you get with x/2 + y/2 is that it can/will give incorrect answers for integer inputs. For example, let’s average 3 and 3. The result should obviously be 3.
But with integer division, 3/2 = 1, and 1+1 = 2.
You need to add one to the result if and only if both inputs are odd.
2- Here’s what I’d do in C++ for integers, which I believe does the right thing including getting the rounding direction correct, and it can likely be made into a template that will do the right thing as well. This is not complete code, but I believe it gets the details correct…

That will work for any signed or unsigned integer type for op1 and op2 as long as they have the same type.
If you want it to do something intelligently where one of the operands is an unsigned type and the other one is a signed type, you could do it, but you need to define exactly what should happen, and realize that it’s quite likely that for maximum arithmetic correctness, the output type may need to be different than either input type. For instance, the average of a uint32_t and an int32_t can be too large to fit in an int32_t, and it can also be too small to fit in a uint32_t, so you probably need to go with a larger signed integer type, maybe int64_t.
3- I would have answered the question with a question, “Tell me more about the input, error handling capability of your system, and is this typical of the level of challenge here at google?” Then I’d provide eye contact, sit back, and see what happens. Years ago I had an interview question that asked what classical problem was part of a pen plotter control system. I told the interviewer that it was TSP but that if you had to change pens, you had to consider how much time it took to switch. They offered me a job but I declined given the poor financial condition of the company (SGI) which I discovered by asking the interviewer questions of my own. IMO: questions are at the heart of engineering. The interviewer, if they are smart, wants to see if you are capable of discovering the true nature of their problems. The best programmers I’ve ever worked with were able to get to the heart of problems and trade off solutions. Coding is a small part of the required skills.
What are some algorithms that computer hardware advances have made obsolete?
It depends on how you want to store and access data.
For the most part, as a general concept, old school cryptography is obsolete.
It was based on ciphers, which were based on it being mathematically “hard” to crack.
If you can throw a compute cluster at DES, even with a one byte “salt”, it’s pretty easy to crack a password database in seconds. Minutes, if your cluster is small.
Almost all computer security is base on big number theory. Today, that’s called:
What it means is that it’s hard to do math on very large numbers, and so if you have a large one, the larger the better.
Most cryptography today is based on elliptic curves.
But we know by the proof of Fermat’s last theorem, and specifically, the Taniyama-Shimura conjecture, is that all elliptic curves have modular forms.
And so this gives us an attack at all modern cryptogrphay, using graphical mathematics.
It’s an interesting field, and problem space.
Not one I’m interested in solving, since I’m sure it has already been solved by my “associates” who now work for the NSA.
I am only interested in new problems.
Comments:
1- Sorry, but this is just wrong. “Almost all cryptography,” counted by number of bytes encrypted and decrypted, uses AES. AES does not use “large numbers,” elliptic curves, or anything of that sort – it’s essentially combinatorial in nature, with a lot of bit-diddling – though there is some group theory at its based. The same can be said about cryptographic checksums such as the SHA series, including the latest “sponge” constructions.
Where RSA and elliptic curves and such come in is public key cryptography. This is important in setting up connections, but for multiple reasons (performance – but also for excellent cryptographic reasons) is not use for bulk encryption. There are related algorithms like Diffie-Hellman and some signature protocols like DSS. All of these “use large numbers” in some sense, but even that’s pushing it – elliptic curve cryptography involves doing math over … points on an elliptic curve, which does lead you to do some arithmetic, but the big advantage of elliptic curves is that the numbers are way, way smaller than for, say, RSA for equivalent security.
Much research these days is on “post-quantum cryptography” – cryptography that is secure against attacks by quantum computers (assuming we ever make those work). These tend not to be based on “arithmetic” in any straightforward sense – the ones that seem to be at the forefront these days are based on computation over lattices.
Cracking a password database that uses DES is so far away from what cryptography today is about that it’s not even related. Yes, the original Unix implementations – almost 50 years ago – used that approach. So?
C++ lambda functions are syntactic sugar for a longstanding set of practices in both C and C++: passing a function as an argument to another function, and possibly connecting a little bit of state to it.
This goes way back. Look at C’s qsort()
:
That last argument is a function pointer to a comparison function. You could use a captureless lambda for the same purpose in modern C++.
Sometimes, you want to tack a little bit of extra state alongside the function. In C, one way to do this is to provide an additional context pointer alongside the the function pointer. The context pointer will get passed back to the function as an argument.
I give an extended example in here:
In C++, that context pointer can be this
. When you do that, you have something called a function object. (Side note: function objects were sometimes called functors; however, functors aren’t really the same thing.)
If you overload the function call operator for a particular class, then objects of that class behave as function objects. That is, you can pretend like the object is a function by putting parentheses and an argument list after the name of an instance! When you arrive at the overloaded operator implementation, this
will point at the instance.
Instances of this class will add an offset to an integer. The function call operator is operator()
below.
and to use it:
That’ll print out the numbers 42, 43, 44, … 51 on separate lines.
And tying this back to the qsort()
example from earlier: C++’s std::sort
can take a function object for its comparison operator.
Modern C++’s lambda functions are syntactic sugar for function objects. They declare a class with an unutterable name, and then give you an instance of that class. Under the hood, the class’ constructor implements the capture, and initializes any state variables.
Other languages have similar constructs. I believe this one originated in LISP. It goes waaaay back.
As for any challenges associated with them: lifetime management. You potentially introduce a non-nested lifetime for any state associated with the callback, function object, or lambda.
If it’s all self contained (i.e. it keeps its own copies of everything), you’re less likely to have a problem. It owns all the state it relies on.
If it has non-owning pointers or references to other objects, you need to ensure the lifetime of your callback/function object/lambda remains within the lifetime of that other non-owned object. If that non-owned object’s lifetime isn’t naturally a superset of the callback/function object/lambda, you should consider taking a copy of that object, or reconsider your design.
Each one has specific strengths in terms of syntax features.
But the way to look at this is that all three are general purpose programming languages. You can write pretty much anything in them.
Trying to rank these languages in some kind of absolute hierarchy makes no sense and only leads to tribal ‘fanboi’ arguments.
If you need part of your code to talk to hardware, or could benefit from taking control of memory management, C++ is my choice.
General web service stuff, Java has an edge due to familiarity.
Anything involving a pre existing Microsoft component – eg data in SQL server, Azure – I will go all in on C#
I see more similarity than difference overall
Visual Studio Code is OK if you can’t find anything better for the language you’re using. There are better alternatives for most popular languages.
C# – Use Visual Studio Community, it’s free, and far better than Visual Studio Code.
Java – Use IntelliJ
Go – Goland.
Python – PyCharm.
C or C++ – CLion.
If you’re using a more unusual language, maybe Rust, Visual Studio Code might be a good choice.
Comments:
#1: Just chipping in here. I used to be a massive visual studio fan boy and loved my fancy gui for doing things without knowing what was actually happening. I’ve been using vscode and Linux for a few years now and am really enjoying the bare metal exposure you get with working on it (and linux) typing commands is way faster to get things done than mouse clicking through a bunch of guis. Both are good though.
#2: C# is unusual in that it’s the only language which doesn’t follow the maxim, “if JetBrains have blessed your language with attention, use their IDE”.
Visual Studio really is first class.
#3: for Rust as long as you have rust-analyzer and clippy, you’re good to go. Vim with lua and VS Code both work perfectly.
#4: This is definitely skirting the realm of opinion. It’s a great piece of software. There is better and worse stuff but it all depends upon the person using it, their skill, and style of development.
#5: VSCode is excellent for coding. I’ve been using it for about 6 years now, mainly for Python work, but also developing JS based mobile apps. I mainly use Visual Studio, but VSC’s slightly stripped back nature has been embellished with plenty of updates and more GUI discovery methods, plus that huge extensions library (I’ve worked with the creation of an intellisense style plugin as well).
I’m personally a fan of keeping it simple on IDEs, and I work in a lot of languages. I’m not installing 6 or 7 IDEs because they apparently have advantages in that specific language, so I’d rather install one IDE which can do a credible job on all of them.
I’m more a fan of developing software than getting anally retentive about knowing all the keyboard shortcuts to format a source file. Life’s too short for that. Way too short!
To each their own. Enjoy whatever you use!
Dmitry Aliev is correct that this
was introduced into the language before references.
I’ll take this question as an excuse to add a bit more color to this
.
C++ evolved from C via an early dialect called “C with Classes”, which was initially implemented with Cpre, a fancy “preprocessor” targeting C that didn’t fully parse the “C with Classes” language. What it did was add an implicit this
pointer parameter to member functions. E.g.:

was translated to something like:
- int f__1S(S *this);
(the funny name f__1S
is just an example of a possible “mangling” of the name of S::f
, which allows traditional linkers to deal with the richer naming environment of C++).
What might comes as a surprise to the modern C++ programmer is that in that model this
is an ordinary parameter variable and therefore it can be assigned to! Indeed, in the early implementations that was possible:

Interestingly, an idiom arose around this ability: Constructors could manage class-specific memory allocation by “assigning to this” before doing anything else in the constructor. E.g.:

That technique (brittle as it was, particularly when dealing with derived classes) became so widespread that when C with Classes was re-implemented with a “real” compiler (Cfront), assignment to this
remained valid in constructors and destructors even though this
had otherwise evolved into an immutable expression. The C++ front end I maintain still has modes that accept that anachronism. See also section 17 of the old Cfront manual found here, for some fun reminiscing.
When standardization of C++ began, the core language work was handled by three working groups: Core I dealt with declarative stuff, Core II dealt with expression stuff, and Core III dealt with “new stuff” (templates and exception handling, mostly). In this context, Core II had to (among many other tasks) formalize the rules for overload resolution and the binding of this
. Over time, they realized that that name binding should in fact be mostly like reference binding. Hence, in standard C++ the binding of something like:

In other words, the expression this
is now effectively a kind of alias for &__this
, where __this is just a name I made up for an unnamable implicit reference parameter.
C++11 further tweaked this by introducing syntax to control the kind of reference that this
is bound from. E.g.,
That model was relatively well-understood by the mid-to-late 1990s… but then unfortunately we forgot about it when we introduced lambda expression. Indeed, in C++11 we allowed lambda expressions to “capture” this
:
After that language feature was released, we started getting many reports of buggy programs that “captured” this
thinking they captured the class value, when instead they really wanted to capture __this
(or *this
). So we scrambled to try to rectify that in C++17, but because lambdas had gotten tremendously popular we had to make a compromise. Specifically:
- we introduced the ability to capture
*this
- we allowed
[=, this]
since now[this]
is really a “by reference” capture of*this
- even though
[this]
was now a “by reference” capture, we left in the ability to write[&, this]
, despite it being redundant (compatibility with earlier standards)
Our tale is not done, however. Once you write much generic C++ code you’ll probably find out that it’s really frustrating that the __this
parameter cannot be made generic because it’s implicitly declared. So we (the C++ standardization committee) decided to allow that parameter to be made explicit in C++23. For example, you can write (example from the linked paper):
In that example, the “object parameter” (i.e., the previously hidden reference parameter __this
) is now an explicit parameter and it is no longer a reference!
Here is another example (also from the paper):
Here:
- the type of the object parameter is a deducible template-dependent type
- the deduction actually allows a derived type to be found
This feature is tremendously powerful, and may well be the most significant addition by C++23 to the core language. If you’re reasonably well-versed in modern C++, I highly recommend reading that paper (P0847) — it’s fairly accessible.
It adds some extra steps in design, testing and deployment for sure. But it can buy you an easier path to scalability and an easier path to fault tolerance and live system upgrades.
It’s not REST itself that enables that. But if you use REST you will have split your code up into independently deployable chunks called services.
So more development work to do, yes, but you get something a single monolith can’t provide. If you need that, then the REST service approach is a quick way to doing it.
We must compare like for like in terms of results for questions like this.
Because at the time, there was likely no need.
Based on what I could find, the strtok
library function appeared in System III UNIX some time in 1980.
In 1980, memory was small, and programs were single threaded. I don’t know whether UNIX had any support for multiple processors, even. I think that happened a few years later.
Its implementation was quite simple.
This was 3 years before they started the standardization process, and 9 years before it was standardized in ANSI C.
This was simple and good enough, and that’s what mattered most. It’s far from the only library function with internal state.
And Lex/YACC took over more complex scanning and parsing tasks, so it probably didn’t get a lot of attention for the lightweight uses it was put to.
For a tongue-in-cheek take on how UNIX and C were developed, read this classic:
Because the ‘under the hood’ code is about 50 years old. I’m not kidding. I worked on some video poker machines that were made in the early 1970’s.
Here’s how they work.
You have an array of ‘cards’ from 0 to 51. Pick one at random. Slap it in position 1 and take it out of your array. Do the same for the next card … see how this works?
Video poker machines are really that simple. They literally simulate a deck of cards.
Anything else, at least in Nevada, is illegal. Let me rephrase that, it is ILLEGAL, in all caps.
If you were to try to make a video poker game (or video keno, or slot machine) in any other way than as close to truly random selection from an ‘array’ of options as you can get, Nevada Gaming will come after you so hard and fast, your third cousin twice removed will have their ears ring for a week.
That is if the Families don’t get you first, and they’re far less kind.
All the ‘magic’ is in the payout tables, which on video poker and keno are literally posted on every machine. If you can read them, you can figure out exactly what the payout odds are for any machine.
There’s also a little note at the bottom stating that the video poker machine you’re looking at uses a 52 card deck.
Comments:
1- I have a slot machine and the code on the odds chip looks much like an excel spread sheet every combination is displayed in this spread sheet, so the exact odds can be listed an payout tables. The machine picks a random number. Let say 452 in 1000. the computer looks at the spread sheet and says that this is the combination of bar bar 7 and you get 2 credits for this combination. The wheels will spin to match the indication on the spread sheet. If I go into the game diagnostics I can see if it is a win or not, you do not win on what the wheels display, but the actual number from the spread sheet. The games knows if you won or lost before the wheels stop.
2- I had a conversation with a guy who had retired from working in casino security. He was also responsible for some setup and maintenance on slot machines, video poker and others. I asked about the infamous video poker machine that a programmer at the manufacturer had put in a backdoor so he and a few pals could get money. That was just before he’d started but he knew how it was done. IIRC there was a 25 step process of combinations of coin drops and button presses to make the machine hit a royal flush to pay the jackpot.
Slot machines that have mechanical reels actually run very large virtual reels. The physical reels have position encoders so the electronics and software can select which symbol to stop on. This makes for far more possible combinations than relying on the space available on the physical reels.
Those islands of machines with the sign that says 95% payout? Well, you guess which machine in the group is set to that payout % while the rest are much closer to the minimum allowed.
Machines with a video screen that gives you a choice of things to select by touch or button press? It doesn’t matter what you select, the outcome is pre-determined. For example, if there’s a grid of spots and the first three matches you get determines how many free spins you get, if the code stopped on giving you 7 free spins, out of a possible maximum of 25, you’re getting 7 free spins no matter which spots you touch. It will tease you with a couple of 25s, a 10 or 15 or two, but ultimately you’ll get three 7s, and often the 3rd 25 will be close to the other two or right next to the last 7 “you” selected to make you feel like you just missed it when the full grid is briefly revealed.
There was a Discovery Channel show where the host used various power tools to literally hack things apart to show their insides and how they worked. In one episode he sawed open a couple of slot machines, one from the 1960’s and a purely mechanical one from the 1930’s or possibly 1940’s. In that old machine he discovered the casino it had been in decades prior had installed a cheat. There was a metal wedge bolted into the notch for the 7 on one reel so it could never hit the 777 jackpot. I wondered if the Nevada Gaming Commission could trace the serial number and if they could levy a fine if the company that had owned and operated it was still in business.
3- Slightly off-topic. I worked for a company that sold computer hardware, one of our customers was the company that makes gambling machines. They said that they spent close to $0 on software and all their budget on licensing characters
This question is like asking why you would ever use int
when you have the Integer
class. Java programmers seem especially zealous about everything needing to be wrapped, and wrapped, and wrapped.
Yes, ArrayList<Integer>
does everything that int[]
does and more… but sometimes all you need to do is swat a fly, and you just need a flyswatter, not a machine-gun.
Did you know that in order to convert int[]
to ArrrayList<Integer>
, the system has to go through the array elements one at a time and box them, which means creating a garbage-collected object on the heap (i.e. Integer
) for each individual int in the array? That’s right; if you just use int[]
, then only one memory alloc is needed, as opposed to one for each item.
I understand that most Java programmers don’t know about that, and the ones who do probably don’t care. They will say that this isn’t going to be the reason your program is running slowly. They will say that if you need to care about those kinds of optimizations, then you should be writing code in C++ rather than Java. Yadda yadda yadda, I’ve heard it all before. Personally though, I think that you should know, and should care, because it just seems wasteful to me. Why dynamically allocate n individual objects when you could just have a contiguous block in memory? I don’t like waste.
I also happen to know that if you have a blasé attitude about performance in general, then you’re apt to be the sort of programmer who unknowingly, unnecessarily writes four nested loops and then has no idea why their program took ten minutes to run even though the list was only 100 elements long. At that point, not even C++ will save you from your inefficiently written code. There’s a slippery slope here.
I believe that a software developer is a sort of craftsman. They should understand their craft, not only at the language level, but also how it works internally. They should convert int[]
to ArrayList<Integer>
only because they know the cost is insignificant, and they have a particular reason for doing so other than “I never use arrays, ArrayList is better LOL”.
Very similar, yes.
Both languages feature:
- Static typing
- nominative interface typing
- garbage collection
- class based
- single dispatch polymorphism
so whilst syntax differs, the key things that separate OO support across languages are the same.
There are differences but you can write the same design of OO program in either language and it won’t look out of place
Last time I needed to write an Android app, even though I already knew Java, I still went with Kotlin 😀
I’d rather work in a language I don’t know than… Java… and yes, I know a decent Java IDE can auto-generate this code – but this only solves the problem of writing the code, it doesn’t solve the problem of having to read it, which happens a lot more than writing it.
I mean, which of the below conveys the programmer’s intent more clearly, and which one would you rather read when you forget what a part of the program does and need a refresher:
Even if both of them required no effort to write… the Java version is pure brain poison…
If you have two books on the same subject, but one is skinny and the other is fat, go with the skinny one. For example:
The book on the left has 796 pages; the book on the right a mere 176. Yet the book on the right told us everything we needed to know to write our own, efficient, native-code-generating Plain English compiler in Plain English:
Compare also the Inside Macintosh documentation before and after the Pascal programmers were replaced with C programmers:
Note that the whole set (green arrow) documenting the slim and trim Pascal system was the same size as a single volume (red arrow) of the bloated C version.
Et voila!
Why is volatile not considered useful in multithreaded C or C++ programming?
Because it’s insufficient to deal with the memory semantics of current computers. In fact, it was obsolete almost as soon as it first became available.
Volatile tells a compiler that it may not assume the value of a memory location has not changed between reads or writes. This is sometimes sufficient to deal with memory-mapped hardware registers, which is what it was originally for.
But that doesn’t deal with the semantics of a multiprocessor machine’s cache, where a memory location might be written and read from several different places, and we need to be sure we know when written values will be observable relative to control flow in the writing thread.
Instead, we need to deal with acquire/release semantics of values, and the compilers have to output the right machine instructions that we get those semantics from the real machines. So, the atomic memory intrinsics come to the rescue. This is also why inline assembler acts as an optimization barrier; before there were intrinsics for this, it was done with inline assembler. But intrinsics are better, because the compiler can still do some optimization with them.
C++ is a programming language specified through a standard that is “abstract” in various ways. For example, that standard doesn’t currently formally recognize a notion of “runtime” (I would actually like to change that a little bit in the future, but we’ll see).
Now, in order to allow implementations to make assumptions it removes certain situations from the responsibility of the implementation. For example, it doesn’t require (in general) that the implementation ensure that accesses to objects are within the bounds of those objects. By dropping that requirement, the code for valid accesses can be more efficient than would be required if out-of-bounds situations were the responsibility of the implementation (as is the case in most other modern programming languages). Those “situations” are what we call “undefined behaviour”: The implementation has no specific responsibilities and so the standard allows “anything” to happen. This is in part why C++ is still very successful in applications that call for the efficient use of hardware resources.
Note, however, that the standard doesn’t disallow an implementation from doing something that is implementation-specified in those “undefined behaviour” situations. It’s perfectly all right (and feasible) for a C++ implementation to be “memory safe” for example (e.g., not attempt access outside of object bounds). Such implementations have existed in the past (and might still exist, but I’m not currently aware of one that completely “contains” undefined behaviour).
ADDENDUM (July 16th, 2021):
The following article about undefined behavior crossed my metaphorical desk today:
- Hey guys, I am an intermediate programmer, That's my Portfolio website , I would to like to partner up with other intermediate programmers on creating side projects for our portfolio, it would be nice to get to know others while building a project and it that way we'll get more motivated.by /u/Thugger021 (programming) on June 27, 2022 at 8:31 am
submitted by /u/Thugger021 [link] [comments]
- Introducing: Sequoia Theme for VS Code - Black, elegant, modern and gentle theme for VS Code.by /u/Michael_andreuzza (programming) on June 27, 2022 at 8:22 am
submitted by /u/Michael_andreuzza [link] [comments]
- Patterns That Every Developer Should Knowby /u/carltonupperdine (programming) on June 27, 2022 at 8:18 am
submitted by /u/carltonupperdine [link] [comments]
- Explaining Insecure Deserializationby /u/Arth_K (programming) on June 27, 2022 at 7:57 am
submitted by /u/Arth_K [link] [comments]
- Is it important to learn DSA for Web Developers?by Programming Pathshala (Programming on Medium) on June 27, 2022 at 7:51 am
Let’s modify the question slightly and answer the same for problem-solving. Data structures and algorithms are just different tools that…Continue reading on Medium »
- Frontend Developer Roadmap — Day 0: Why I want to learn frontend developmentby Eric van Rees (Programming on Medium) on June 27, 2022 at 7:49 am
Here is some context about my motives to start this blog series and follow a strict scheme like this roadmap:Continue reading on Medium »
- The difference between null check with ‘is’ instead of ‘==’ in C#by Erick Gallani (Programming on Medium) on June 27, 2022 at 7:47 am
What is the difference between myObject == null or myObject is null?Continue reading on Medium »
- 5 Reasons to Love Python and One to Dislikeby Dmytro Khmelenko (Programming on Medium) on June 27, 2022 at 7:47 am
The causes that took the attention of millions to PythonContinue reading on Medium »
- 5 Reasons to Love Python and One to Dislikeby Dmytro Khmelenko (Python on Medium) on June 27, 2022 at 7:47 am
The causes that took the attention of millions to PythonContinue reading on Medium »
- Memory Safety for the World’s Largest Software Projectby /u/Alexander_Selkirk (programming) on June 27, 2022 at 7:41 am
submitted by /u/Alexander_Selkirk [link] [comments]
- The Power of Ten – Rules for Developing Safety Critical Codeby /u/Alexander_Selkirk (programming) on June 27, 2022 at 7:40 am
submitted by /u/Alexander_Selkirk [link] [comments]
- Rust is mostly safetyby /u/Alexander_Selkirk (programming) on June 27, 2022 at 7:37 am
submitted by /u/Alexander_Selkirk [link] [comments]
- Best Data Science Slack Communities To Joinby NM dev (Programming on Medium) on June 27, 2022 at 7:32 am
Data science encompasses preparing data for analysis, including cleansing, aggregating, and manipulating the data to perform advanced data…Continue reading on Medium »
- Loop faster in Pythonby Matt Burke (Python on Medium) on June 27, 2022 at 7:32 am
Looping is probably one of the first things you might learn to do when writing code. The syntax for writing loops in Python is quite…Continue reading on Medium »
- How to use GraphQL to build Backend-For-Frontends (BFFs)by Lakindu Hewawasam (Programming on Medium) on June 27, 2022 at 7:32 am
Step by step guide to implementing a GraphQL Backend-For-FrontendContinue reading on Bits and Pieces »
- New Features in ECMAScript 2022 for Class Elementsby Zachary Lee (Coding on Medium) on June 27, 2022 at 7:30 am
What convenience does it bring?Continue reading on Dev Genius »
- New Features in ECMAScript 2022 for Class Elementsby Zachary Lee (Programming on Medium) on June 27, 2022 at 7:30 am
What convenience does it bring?Continue reading on Dev Genius »
- Understanding Python context-managers for absolute beginnersby Mike Huls (Coding on Medium) on June 27, 2022 at 7:29 am
Understand the WITH statement with lightsabersContinue reading on Medium »
- Understanding Python context-managers for absolute beginnersby Mike Huls (Python on Medium) on June 27, 2022 at 7:29 am
Understand the WITH statement with lightsabersContinue reading on Medium »
- Understanding Python context-managers for absolute beginnersby Mike Huls (Programming on Medium) on June 27, 2022 at 7:29 am
Understand the WITH statement with lightsabersContinue reading on Medium »
- Graph Databases: A Comprehensive Guideby /u/AdOverall2123 (programming) on June 27, 2022 at 7:28 am
submitted by /u/AdOverall2123 [link] [comments]
- Git Dasarby Ridwan Satria Wicaksana (Programming on Medium) on June 27, 2022 at 7:27 am
Continue reading on Medium »
- Recursionby Kristi Seraj (Programming on Medium) on June 27, 2022 at 7:22 am
What is recursion?Continue reading on Medium »
- Numba로 Pairwise Jaccard score 계산 가속by Chiwon Son (Python on Medium) on June 27, 2022 at 7:20 am
Numba의 목적은 Python 함수의 실행 시간을 단축 시키는 것입니다. 이 문서에서는 binary array 들의 집합에서 모든 쌍의 Jaccard score 계산에 GPU 병렬 처리를 적용하여, 실행 시간이 얼마나 단축되는지 비교하겠습니다.Continue reading on Medium »
- How to get data from database in Symfony?by /u/PenciledMinimum866 (programming) on June 27, 2022 at 7:00 am
submitted by /u/PenciledMinimum866 [link] [comments]
- BEGINNING TO PROGRAMby Ayush Singh Tomar (Coding on Medium) on June 27, 2022 at 6:59 am
HELLO DEAR MATES , I am Ayush Singh Tomar I have recently started to learn machine language (c programming language to be more specific ) …Continue reading on Medium »
- 23 Best React Component Libraries for Developersby /u/MichaelOconnor1 (programming) on June 27, 2022 at 6:59 am
submitted by /u/MichaelOconnor1 [link] [comments]
- Know this before starting a career in ML/AI….by CodeSapiens (Coding on Medium) on June 27, 2022 at 6:58 am
Building a career in Data Science + Machine Learning + Artificial IntelligenceContinue reading on Medium »
- Software Testing | An integral part of the Software Development Life Cycleby Zelanda van Drünick (Coding on Medium) on June 27, 2022 at 6:53 am
Written by Verna Baatjies, Senior Consultant at SaratogaContinue reading on Saratoga Software »
- Shrinking a Machine Learning Pipeline for AWS Lambdaby /u/hisgayden (programming) on June 27, 2022 at 6:52 am
submitted by /u/hisgayden [link] [comments]
- A complete guide to Array destructuring | JavaScriptby Rahul (hustling.tech, Fueler.io) (Coding on Medium) on June 27, 2022 at 6:52 am
Destructuring in JavaScript is a worked on technique for extricating different properties from a cluster by taking the structure and…Continue reading on Medium »
- Development Environments: discussion about terminals and IDEs in 2022by /u/phaazon_ (programming) on June 27, 2022 at 6:47 am
submitted by /u/phaazon_ [link] [comments]
- Video: How to use git-secret via Docker - Encrypting secrets in git [Tutorial]by /u/Hirnhamster (programming) on June 27, 2022 at 6:34 am
submitted by /u/Hirnhamster [link] [comments]
- Amazon launches CodeWhisperer, an AI code-writing tool for programmersby TechGig (Coding on Medium) on June 27, 2022 at 6:30 am
Swami Sivasubramanian, Vice President of Amazon’s cloud division, announced the tool Amazon CodeWhisperer, which searches for security and…Continue reading on Medium »
- What happens when cricketing madness is combined with data analysis?by Asif Syed (Python on Medium) on June 27, 2022 at 6:22 am
People living in European and South American countries are passionate about football.Continue reading on Medium »
- What Should You Learn Next as a Developer?by Marcin (Coding on Medium) on June 27, 2022 at 6:18 am
A simple model of how to evaluate the next step in the never-ending training!Continue reading on JavaScript in Plain English »
- Python Map, Filter and Reduceby Narayanan S (Python on Medium) on June 27, 2022 at 6:10 am
Here we are gonna to discuss about Python Map, Filter and Reduce methods.Continue reading on Medium »
- Group Anagrams using Pythonby S. Khan (Python on Medium) on June 27, 2022 at 6:03 am
Given an array of strings, group the anagrams together. You can return the answer in any order.Continue reading on Insights School »
- Improve your conditional logic in Python with singledispatch & Advanced Enumerationsby Johannes Schmidt (Python on Medium) on June 27, 2022 at 6:02 am
How to register functions in singledispatch with members of an Enum class.Continue reading on Medium »
- Deep Q-Network — a Backseat Gamer’s best friendby Khayyon Parker (Python on Medium) on June 27, 2022 at 5:39 am
Introduction and reflection on SARSA PostContinue reading on Medium »
- free coding learning websites free coding websitesby Themad Gamer (Coding on Medium) on June 27, 2022 at 5:30 am
Coding is an art. if you think coding is difficult then there are two reasons behind it, the first one is you learned but never practiced…Continue reading on Medium »
- 10 Best Remote Job Websites For Tech Roles In 2022by CodeSparrow (Coding on Medium) on June 27, 2022 at 5:15 am
Remote work is the new standard for innovation, collaboration, and culture. Teams are becoming more and more distributed in a world where…Continue reading on Medium »
- ASPLOS'22 - Session 4B - Enzian: An Open, General, CPU/FPGA Platform for Systems Software Researchby /u/cyn4692 (programming) on June 27, 2022 at 3:45 am
submitted by /u/cyn4692 [link] [comments]
- What's New in Python 3.11?by /u/iamkeyur (programming) on June 27, 2022 at 2:48 am
submitted by /u/iamkeyur [link] [comments]
- What does an idle CPU do? (2014)by /u/iamkeyur (programming) on June 27, 2022 at 2:48 am
submitted by /u/iamkeyur [link] [comments]
- The SQLite Code of Ethicsby /u/iamkeyur (programming) on June 27, 2022 at 1:18 am
submitted by /u/iamkeyur [link] [comments]
- The Other Kind of Staff Software Engineerby /u/fagnerbrack (programming) on June 26, 2022 at 7:02 pm
submitted by /u/fagnerbrack [link] [comments]
- Sorting algorithms visualized with Blenderby /u/kiedtl (programming) on June 26, 2022 at 5:42 pm
submitted by /u/kiedtl [link] [comments]
- Architect Manifestoby /u/Adventurous-Salt8514 (programming) on June 26, 2022 at 5:18 pm
submitted by /u/Adventurous-Salt8514 [link] [comments]
- Next-Gen Language Features: User Code on the GPUby /u/verdagon (programming) on June 26, 2022 at 4:17 pm
submitted by /u/verdagon [link] [comments]
- Hard things in Computer Scienceby /u/nfrankel (programming) on June 26, 2022 at 4:02 pm
submitted by /u/nfrankel [link] [comments]
- Buffer overflow exploitation in vulnerable WebAssembly applicationsby /u/chaplja (programming) on June 26, 2022 at 12:28 pm
submitted by /u/chaplja [link] [comments]
- "Google" programmers. How one idiot hired a couple more idiotsby /u/tungustein (programming) on June 26, 2022 at 6:27 am
submitted by /u/tungustein [link] [comments]
- Italy declares Google Analytics illegalby /u/DonutAccomplished422 (programming) on June 25, 2022 at 4:01 pm
submitted by /u/DonutAccomplished422 [link] [comments]
A Twitter List by enoumen
CyberSecurity 101 and Top 25 AWS Certified Security Specialty Questions and Answers Dumps
Almost 4.57 billion people were active internet users as of July 2020, encompassing 59 percent of the global population. 94% of enterprises use cloud. 77% of organizations worldwide have at least one application running on the cloud. This results in an exponential growth of cyber attacks. Therefore, CyberSecurity is one the biggest challenge to individuals and organizations worldwide: 158,727 cyber attacks per hour, 2,645 per minute and 44 every second of every day.
In this blog, we cover the Top 25 AWS Certified Security Specialty Questions and Answers Dumps and all latest and relevant information about CyberSecurity including:
- CyberSecurity Key Terms
- CyberSecurity Certification Roadmap
- Hacking Tools Cheat Sheet
- Wireshark Cheat Sheet
- CyberSecurity Top Posts on Reddit
- Best CyberSecurity Books
- Best CyberSecurity Online Training
- Best CyberSecurity Courses
- Best CyberSecurity Podcasts
- Best Cybersecurity Youtube Channels
- CyberSecurity Jobs
- CyberSecurity Cheat Sheets
- How SSl Certificates Works
- Penetration Testing Terms
- CyberSecurity Post COVID-19
- CyberSecurity Questions and Answers
- What are the best ways to protect yourself on the internet?
- Who are the notable hackers
- History of RansomWare
I- The AWS Certified Security – Specialty (SCS-C01) examination is intended for individuals who perform a security role. This exam validates an examinee’s ability to effectively demonstrate knowledge about securing the AWS platform.
It validates an examinee’s ability to demonstrate:
An understanding of specialized data classifications and AWS data protection mechanisms.
An understanding of data-encryption methods and AWS mechanisms to implement them.
An understanding of secure Internet protocols and AWS mechanisms to implement them.
A working knowledge of AWS security services and features of services to provide a secure production environment.
Competency gained from two or more years of production deployment experience using AWS security services and features.
The ability to make tradeoff decisions with regard to cost, security, and deployment complexity given a set of application requirements.

An understanding of security operations and risks.
Below are the Top 25 AWS Certified Security Specialty Questions and Answers Dumps including Notes, Hint and References:
Question 1: When requested through an STS API call, credentials are returned with what three components?
ANSWER1:
Notes/Hint1:
Reference1: Security Token, Access Key ID, Secret Access Key
Get mobile friendly version of the quiz @ the App Store
Question 2: A company has AWS workloads in multiple geographical locations. A Developer has created an Amazon Aurora database in the us-west-1 Region. The database is encrypted using a customer-managed AWS KMS key. Now the Developer wants to create the same encrypted database in the us-east-1 Region. Which approach should the Developer take to accomplish this task?
ANSWER2:
Notes/Hint2:
Reference2: copies an encrypted snapshot, KMS Keys are Region-specific
Get mobile friendly version of the quiz @ the App Store
Question 3: A corporate cloud security policy states that communication between the company’s VPC and KMS must travel entirely within the AWS network and not use public service endpoints. Which combination of the following actions MOST satisfies this requirement? (Select TWO.)
ANSWER3:
Notes/Hint3:
Reference3: AWS KMS
Get mobile friendly version of the quiz @ the App Store
Question 4: An application team is designing a solution with two applications. The security team wants the applications’ logs to be captured in two different places, because one of the applications produces logs with sensitive data. Which solution meets the requirement with the LEAST risk and effort?
ANSWER4:
Notes/Hint4:
Reference4: Amazon CloudWatch Logs log group.
Get mobile friendly version of the quiz @ the App Store
Question 5: A security engineer must set up security group rules for a three-tier application:
- Presentation tier – Accessed by users over the web, protected by the security group presentation-sg
- Logic tier – RESTful API accessed from the presentation tier through HTTPS, protected by the security group logic-sg
- Data tier – SQL Server database accessed over port 1433 from the logic tier, protected by the security group data-sg
ANSWER5:
Notes/Hint5:
Reference5: n-tier architecture
Get mobile friendly version of the quiz @ the App Store
Question 6: A security engineer is working with a product team building a web application on AWS. The application uses Amazon S3 to host the static content, Amazon API Gateway to provide RESTful services, and Amazon DynamoDB as the backend data store. The users already exist in a directory that is exposed through a SAML identity provider. Which combination of the following actions should the engineer take to enable users to be authenticated into the web application and call APIs? (Select THREE).
ANSWER6:
Notes/Hint6:
Reference6: user pool attributes Amazon API Gateway
Get mobile friendly version of the quiz @ the App Store
Question 7: A company is hosting a web application on AWS and is using an Amazon S3 bucket to store images. Users should have the ability to read objects in the bucket. A security engineer has written the following bucket policy to grant public read access:
ANSWER7:
Notes/Hint7:
Reference7: IAM Policy – Access to S3 bucket
Get mobile friendly version of the quiz @ the App Store
Question 8: A company decides to place database hosts in its own VPC, and to set up VPC peering to different VPCs containing the application and web tiers. The application servers are unable to connect to the database. Which network troubleshooting steps should be taken to resolve the issue? (Select TWO.)
ANSWER8:
Notes/Hint8:
Reference8: route tables , rules to the security group , security group in the other VPC
Get mobile friendly version of the quiz @ the App Store
Question 9: A company is building a data lake on Amazon S3. The data consists of millions of small files containing sensitive information. The security team has the following requirements for the architecture:
- Data must be encrypted in transit.
- Data must be encrypted at rest.
- The bucket must be private, but if the bucket is accidentally made public, the data must remain confidential.
ANSWER9:
Notes/Hint9:
Reference9: Bucket encryption using KMS, privileges granted data in transit
Get mobile friendly version of the quiz @ the App Store
Question 10: A security engineer must ensure that all API calls are collected across all company accounts, and that they are preserved online and are instantly available for analysis for 90 days. For compliance reasons, this data must be restorable for 7 years. Which steps must be taken to meet the retention needs in a scalable, cost-effective way?
ANSWER10:
Notes/Hint10:
Reference10: lifecycle policies
Get mobile friendly version of the quiz @ the App Store
Question 11: A security engineer has been informed that a user’s access key has been found on GitHub. The engineer must ensure that this access key cannot continue to be used, and must assess whether the access key was used to perform any unauthorized activities. Which steps must be taken to perform these tasks?
ANSWER11:
Notes/Hint11:
Reference11: malicious activities
Get mobile friendly version of the quiz @ the App Store
Question 12: You have a CloudFront
A) CloudFront
B) The ‘*’ path
ANSWER12:
Notes/Hint12:
Reference12: CloudFront
Get mobile friendly version of the quiz @ the App Store
Question 13: An application running
ANSWER13:
Notes/Hint13:
Reference13: S3
Get mobile friendly version of the quiz @ the App Store
Question 14: An organization is
ANSWER14:
Notes/Hint14:
Reference14: AWS
Get mobile friendly version of the quiz @ the App Store
Question 15: From a security
ANSWER15:
Notes/Hint15:
Reference15: IAM
Get mobile friendly version of the quiz @ the App Store
Question 16: A company is storing an
ANSWER16:
Notes/Hint16:
Reference16: IAM Roles for EC2
Get mobile friendly version of the quiz @ the App Store
Question 17: While signing in REST/
ANSWER17:
Notes/Hint17:
Reference17: Rest API
Get mobile friendly version of the quiz @ the App Store
Question 18: You are using AWS
ANSWER18:
Notes/Hint18:
Reference18: KMS
Get mobile friendly version of the quiz @ the App Store
Question 19: Your company has
ANSWER2:
Notes/Hint19:
Reference19: About Web Identity Federation
Get mobile friendly version of the quiz @ the App Store
Question 20: Your application
ANSWER20:
Notes/Hint20:
Reference20: Cognito Streams
ANSWER21:
Notes/Hint21:
Reference21: AWS Key
Question 22: Which of the following
ANSWER22:
Notes/Hint22:
Reference22: KMS
ANSWER23:
Notes/Hint23:
Reference23: Envelope encryption
Question 24: Which command can you
ANSWER24:
Notes/Hint24:
Reference24: AWS
Question 25: If an EC2 instance uses an instance role, key rotation is automatic and handled by __.
ANSWER25:
Notes/Hint25:
Reference25: IAM/STS
Get mobile friendly version of the quiz @ the App Store
II- SOURCES:
0- Djamga Cloud Security Playlist on Youtube:
1- Developer Certified Exam Prep Pro App
2- Prepare for Your AWS Certification Exam
CYBERSECURITY KEY TERMS
-
- Cryptography: Practice and study of techniques for secure communication in the presence of third parties called adversaries.
-
- Hacking: catch-all term for any type of misuse of a computer to break the security of another computing system to steal data, corrupt systems or files, commandeer the environment or disrupt data-related activities in any way.
-
- Cyberwarfare: Uuse of technology to attack a nation, causing comparable harm to actual warfare. There is significant debate among experts regarding the definition of cyberwarfare, and even if such a thing exists
-
- Penetration testing: Colloquially known as a pen test, pentest or ethical hacking, is an authorized simulated cyberattack on a computer system, performed to evaluate the security of the system. Not to be confused with a vulnerability assessment.
-
-
- Malwares: Any software intentionally designed to cause damage to a computer, server, client, or computer network. A wide variety of malware types exist, including computer viruses, worms, Trojan horses, ransomware, spyware, adware, rogue software, and scareware.
- Malware Analysis Tool: Any .Run Malware hunting with live access to the heart of an incident https://any.run/Malware Analysis Total: VirusTotal – Analyze suspicious files and URLs to detect types of malware, automatically share them with the security community https://www.virustotal.com/gui/
-
-
- VPN: A virtual private network (VPN) extends a private network across a public network and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network. Applications running across a VPN may therefore benefit from the functionality, security, and management of the private network. Encryption is a common, although not an inherent, part of a VPN connection.
-
- Antivirus: Antivirus software, or anti-virus software (abbreviated to AV software), also known as anti-malware, is a computer program used to prevent, detect, and remove malware.
-
- DDos: A distributed denial-of-service (DDoS) attack is one of the most powerful weapons on the internet. When you hear about a website being “brought down by hackers,” it generally means it has become a victim of a DDoS attack.
-
- Fraud Detection: Set of activities undertaken to prevent money or property from being obtained through false pretenses. Fraud detection is applied to many industries such as banking or insurance. In banking, fraud may include forging checks or using stolen credit cards.
-
- Spywares: Spyware describes software with malicious behavior that aims to gather information about a person or organization and send such information to another entity in a way that harms the user; for example by violating their privacy or endangering their device’s security.
- Spoofing: Disguising a communication from an unknown source as being from a known, trusted source
- Pharming: Malicious websites that look legitimate and are used to gather usernames and passwords.
- Catfishing: Creating a fake profile for fraudulent or deceptive purposes
-
- SSL: Stands for secure sockets layer. Protocol for web browsers and servers that allows for the authentication, encryption and decryption of data sent over the Internet.
- Phishing emails: Disguised as trustworthy entity to lure someone into providing sensitive information
-
- Intrusion detection System: Device or software application that monitors a network or systems for malicious activity or policy violations. Any intrusion activity or violation is typically reported either to an administrator or collected centrally using a security information and event management system.
-
- Encryption: Encryption is the method by which information is converted into secret code that hides the information’s true meaning. The science of encrypting and decrypting information is called cryptography. In computing, unencrypted data is also known as plaintext, and encrypted data is called ciphertext.
-
- MFA: Multi-factor authentication (MFA) is defined as a security mechanism that requires an individual to provide two or more credentials in order to authenticate their identity. In IT, these credentials take the form of passwords, hardware tokens, numerical codes, biometrics, time, and location.
-
- Vulnerabilities: A vulnerability is a hole or a weakness in the application, which can be a design flaw or an implementation bug, that allows an attacker to cause harm to the stakeholders of an application. Stakeholders include the application owner, application users, and other entities that rely on the application.
-
- SQL injections: SQL injection is a code injection technique, used to attack data-driven applications, in which malicious SQL statements are inserted into an entry field for execution.
-
- Cyber attacks: In computers and computer networks an attack is any attempt to expose, alter, disable, destroy, steal or gain unauthorized access to or make unauthorized use of an asset.
-
- Confidentiality: Confidentiality involves a set of rules or a promise usually executed through confidentiality agreements that limits access or places restrictions on certain types of information.
-
- Secure channel: In cryptography, a secure channel is a way of transferring data that is resistant to overhearing and tampering. A confidential channel is a way of transferring data that is resistant to overhearing, but not necessarily resistant to tampering.
-
- Tunneling: Communications protocol that allows for the movement of data from one network to another. It involves allowing private network communications to be sent across a public network through a process called encapsulation.
-
- SSH: Secure Shell is a cryptographic network protocol for operating network services securely over an unsecured network. Typical applications include remote command-line, login, and remote command execution, but any network service can be secured with SSH.
-
- SSL Certificates: SSL certificates are what enable websites to move from HTTP to HTTPS, which is more secure. An SSL certificate is a data file hosted in a website’s origin server. SSL certificates make SSL/TLS encryption possible, and they contain the website’s public key and the website’s identity, along with related information.
-
- Phishing: Phishing is a cybercrime in which a target or targets are contacted by email, telephone or text message by someone posing as a legitimate institution to lure individuals into providing sensitive data such as personally identifiable information, banking and credit card details, and passwords.
-
- Cybercrime: Cybercrime, or computer-oriented crime, is a crime that involves a computer and a network. The computer may have been used in the commission of a crime, or it may be the target. Cybercrime may threaten a person, company or a nation’s security and financial health.
-
- Backdoor: A backdoor is a means to access a computer system or encrypted data that bypasses the system’s customary security mechanisms. A developer may create a backdoor so that an application or operating system can be accessed for troubleshooting or other purposes.
-
- Salt and Hash: A cryptographic salt is made up of random bits added to each password instance before its hashing. Salts create unique passwords even in the instance of two users choosing the same passwords. Salts help us mitigate rainbow table attacks by forcing attackers to re-compute them using the salts.
-
- Password: A password, sometimes called a passcode,[1] is a memorized secret, typically a string of characters, usually used to confirm the identity of a user.[2] Using the terminology of the NIST Digital Identity Guidelines,[3] the secret is memorized by a party called the claimant while the party verifying the identity of the claimant is called the verifier. When the claimant successfully demonstrates knowledge of the password to the verifier through an established authentication protocol,[4] the verifier is able to infer the claimant’s identity.
-
- Fingerprint: A fingerprint is an impression left by the friction ridges of a human finger. The recovery of partial fingerprints from a crime scene is an important method of forensic science. Moisture and grease on a finger result in fingerprints on surfaces such as glass or metal.
-
- Facial recognition: Facial recognition works better for a person as compared to fingerprint detection. It releases the person from the hassle of moving their thumb or index finger to a particular place on their mobile phone. A user would just have to bring their phone in level with their eye.
-
- Asymmetric key ciphers versus symmetric key ciphers (Difference between symmetric and Asymmetric encryption): The basic difference between these two types of encryption is that symmetric encryption uses one key for both encryption and decryption, and the asymmetric encryption uses public key for encryption and a private key for decryption.
-
- Decryption: The conversion of encrypted data into its original form is called Decryption. It is generally a reverse process of encryption. It decodes the encrypted information so that an authorized user can only decrypt the data because decryption requires a secret key or password.
-
- Algorithms: Finite sequence of well-defined, computer-implementable instructions, typically to solve a class of problems or to perform a computation.
-
- Authentication: is the act of proving an assertion, such as the identity of a computer system user. In contrast with identification, the act of indicating a person or thing’s identity, authentication is the process of verifying that identity. It might involve validating personal identity documents, verifying the authenticity of a website with a digital certificate,[1] determining the age of an artifact by carbon dating, or ensuring that a product or document is not counterfeit.
-
- DFIR: Digital forensic and incident response: Multidisciplinary profession that focuses on identifying, investigating, and remediating computer network exploitation. This can take varied forms and involves a wide variety of skills, kinds of attackers, an kinds of targets. We’ll discuss those more below.
-
-
- OTP: One Time Password: A one-time password, also known as one-time PIN or dynamic password, is a password that is valid for only one login session or transaction, on a computer system or other digital device
-
-
- Proxy Server and Reverse Proxy Server:A proxy server is a go‑between or intermediary server that forwards requests for content from multiple clients to different servers across the Internet. A reverse proxy server is a type of proxy server that typically sits behind the firewall in a private network and directs client requests to the appropriate backend server.
LATEST CYBER SECURITY NEWS
Cybersecurity Certification

WireShark Cheat Sheet

HACKING TOOLS CHEAT SHEET

Top CyberSecurity All Time Posts
Show All Around Defender Primers
- Linux CLI 101 https://wiki.sans.blue/Tools/pdfs/LinuxCLI101.pdf
- Linux CLI https://wiki.sans.blue/Tools/pdfs/LinuxCLI.pdf
- PowerShell Primer https://wiki.sans.blue/Tools/pdfs/PowerShell.pdf
- PowerShell Get-WinEvent https://wiki.sans.blue/Tools/pdfs/Get-WinEvent.pdf
Show Offensive * Exploit Database
Offensive * Exploit Database – The Exploit Database is maintained by Offensive Security, an information security training company that provides various Information Security Certifications as well as high end penetration testing services. https://www.exploit-db.com/
CYBERSECURITY NEWS
- Krebs On Security In depth security news and investigation https://krebsonsecurity.com/
- Dark Reading Cyber security’s comprehensive news site is now an online community for security professionals. https://www.darkreading.com/
- The Hacker News – The Hacker News (THN) is a leading, trusted, widely-acknowledged dedicated cybersecurity news platform, attracting over 8 million monthly readers including IT professionals, researchers, hackers, technologists, and enthusiasts. https://thehackernews.com
- SecuriTeam – A free and independent source of vulnerability information. https://securiteam.com/
- SANS NewsBites – “A semiweekly high-level executive summary of the most important news articles that have been published on computer security during the last week. Each news item is very briefly summarized and includes a reference on the web for detailed information, if possible.” Published for free on Tuesdays and Fridays. https://www.sans.org/newsletters/newsbites
CYBERSECURITY YOUTUBE CHANNELS
This list was originally forked/curated from here: https://wportal.xyz/collection/cybersec-yt1 on (7/29/2020) Attribution and appreciation to d4rckh
- Djamga Technology
- SimplyCyber Weekly vids, Simply Cyber brings Information security related content to help IT or Information Security professionals take their career further, faster. Current cyber security industry topics and techniques are explored to promote a career in the field. Topics cover offense, defense, governance, risk, compliance, privacy, education, certification, conferences; all with the intent of professional development. https://www.youtube.com/c/GeraldAuger
- IPPSec https://www.youtube.com/channel/UCa6eh7gCkpPo5XXUDfygQQA
- Tradecraft Security Weekly – Want to learn about all of the latest security tools and techniques? https://wiki.securityweekly.com/Tradecraft_Security_Weekly
- Derek Rook – CTF/Boot2root/wargames Walkthrough – lots of lengthy screenshot instructional vids https://www.youtube.com/channel/UCMACXuWd2w6_IEGog744UaA
- Adrian Crenshaw – lots of lengthy con-style talks https://www.youtube.com/user/irongeek
- LionSec – lots of brief screenshot instructional vids, no dialog https://www.youtube.com/channel/UCCQLBOt_hbGE-b9I696VRow
- Zer0Mem0ry – lots of brief c++ security videos, programming intensive https://www.youtube.com/channel/UCDk155eaoariJF2Dn2j5WKA
- webpwnized – lots of brief screenshot vids, some CTF walkthroughs https://www.youtube.com/channel/UCPeJcqbi8v46Adk59plaaXg
- Waleed Jutt – lots of brief screenshot vids covering web security and game programming https://www.youtube.com/channel/UCeN7cOELsyMHrzfMsJUgv3Q
- Troy Hunt – lone youtuber, medium length news videos, 16K followers, regular content https://www.youtube.com/channel/UCD6MWz4A61JaeGrvyoYl-rQ
- Tradecraft Security Weekly – Want to learn about all of the latest security tools and techniques?https://wiki.securityweekly.com/Tradecraft_Security_Weekly
- SSTec Tutorials – lots of brief screenshot vids, regular updates https://www.youtube.com/channel/UCHvUTfxL_9bNQgqzekPWHtg
- Shozab Haxor – lots of screenshot style instructional vids, regular updates, windows CLI tutorial https://www.youtube.com/channel/UCBwub2kRoercWQJ2mw82h3A
- Seytonic – variety of DIY hacking tutorials, hardware hacks, regular updates https://www.youtube.com/channel/UCW6xlqxSY3gGur4PkGPEUeA
- Security Weekly – regular updates, lengthy podcast-style interviews with industry pros https://www.youtube.com/channel/UCg–XBjJ50a9tUhTKXVPiqg
- SecureNinjaTV – brief news bites, irregular posting, 18K followers https://www.youtube.com/channel/UCNxfV4yR0nIlhFmfwcdf3BQ
- Samy Kamkar’s Applied hacking https://www.youtube.com/user/s4myk
- rwbnetsec – lots of medium length instructional videos covering tools from Kali 2.0, no recent posts. https://www.youtube.com/channel/UCAJ8Clc3188ek9T_5XTVzZQ
- Penetration Testing in Linux https://www.youtube.com/channel/UC286ntgASMskhPIJQebJVvA
- Pentester Academy TV – lots of brief videos, very regular posting, up to +8 a week https://www.youtube.com/channel/UChjC1q6Ami7W0E71TzPZELA
- Open SecurityTraining – lots of lengthy lecture-style vids, no recent posts, but quality info. https://www.youtube.com/channel/UCthV50MozQIfawL9a_g5rdg
- NetSecNow – channel of pentesteruniversity.org, seems to post once a month, screenshot instructional vids https://www.youtube.com/channel/UC6J_GnSAi7F2hY4RmnMcWJw
- Metasploitation – lots of screenshot vids, little to no dialogue, all about using Metasploit, no recent vids. https://www.youtube.com/channel/UC9Qa_gXarSmObPX3ooIQZrg
- LiveOverflow – Lots of brief-to-medium instructional vids, covering things like buffer overflows and exploit writing, regular posts. https://www.youtube.com/channel/UClcE-kVhqyiHCcjYwcpfj9w
- LionSec – lots of brief screenshot instructional vids, no dialog https://www.youtube.com/channel/UCCQLBOt_hbGE-b9I696VRow
- Latest Hacking News 10K followers, medium length screenshot videos, no recent releases https://www.youtube.com/user/thefieldhouse/feed
- John Hammond – Solves CTF problems. contains penTesting tips and tricks https://www.youtube.com/user/RootOfTheNull
- JackkTutorials – lots of medium length instructional vids with some AskMe vids from the youtuber https://www.youtube.com/channel/UC64x_rKHxY113KMWmprLBPA
- iExplo1t – lots of screenshot vids aimed at novices, 5.7K Followers, no recent posts https://www.youtube.com/channel/UCx0HClQ_cv0sLNOVhoO2nxg/videos
- HACKING TUTORIALS – handful of brief screenshot vids, no recent posts. https://www.youtube.com/channel/UCbsn2kQwNxcIzHwbdDjzehA
- HackerSploit – regular posts, medium length screenshot vids, with dialog https://www.youtube.com/channel/UC0ZTPkdxlAKf-V33tqXwi3Q
- GynvaelEN – Security streams from Google Researcher. Mainly about CTFs, computer security, programing and similar things. https://www.youtube.com/channel/UCCkVMojdBWS-JtH7TliWkVg
- Geeks Fort – KIF – lots of brief screenshot vids, no recent posts https://www.youtube.com/channel/UC09NdTL2hkThGLSab8chJMw
- Error 404 Cyber News – short screen-shot videos with loud metal, no dialog, bi-weekly https://www.youtube.com/channel/UC4HcNHFKshqj-aeyi6imW7Q
- Don Does 30 – amateur pen-tester posting lots of brief screenshot vids regularly, 9K Followers https://www.youtube.com/channel/UCarxjDjSYsIf50Jm73V1D7g
- Derek Rook – CTF/Boot2root/wargames Walkthrough – lots of lengthy screenshot instructional vids, https://www.youtube.com/channel/UCMACXuWd2w6_IEGog744UaA
- DemmSec – lots of pen testing vids, somewhat irregular uploads, 44K followers https://www.youtube.com/channel/UCJItQmwUrcW4VdUqWaRUNIg
- DEFCON Conference – lots of lengthy con-style vids from the iconical DEFCON https://www.youtube.com/channel/UC6Om9kAkl32dWlDSNlDS9Iw
- DedSec – lots of brief screenshot how-to vids based in Kali, no recent posts. https://www.youtube.com/channel/UCx34ZZW2KgezfUPPeL6m8Dw
- danooct1 – lots of brief screenshot, how-to vids regarding malware, regular content updates, 186K followers https://www.youtube.com/channel/UCqbkm47qBxDj-P3lI9voIAw
- BalCCon – Balkan Computer Congress – Long con-style talks from the Balkan Computer Congress, doesn’t update regularlyhttps://www.youtube.com/channel/UCoHypmu8rxlB5Axh5JxFZsA
- Corey Nachreiner – security newsbites, 2.7K subscribers, 2-3 videos a week, no set schedule https://www.youtube.com/channel/UC7dUL0FbVPGqzdb2HtWw3Xg
- Adrian Crenshaw – lots of lengthy con-style talks https://www.youtube.com/user/irongeek
- 0x41414141 – Channel with couple challenges, well explained https://www.youtube.com/channel/UCPqes566OZ3G_fjxL6BngRQ
- HackADay – Hackaday serves up Fresh Hacks Every Day from around the Internet. https://hackaday.com/
- TheCyberMentor – Heath Adams uploads regular videos related to various facets of cyber security, from bug bounty hunts to specific pentest methodologies like API, buffer overflows, networking. https://www.youtube.com/c/TheCyberMentor/
- Grant Collins – Grant uploads videos regarding breaking into cybersecurity, various cybersecurity projects, building up a home lab amongst many others. Also has a companion discord channel and a resource website. https://www.youtube.com/channel/UCTLUi3oc1-a7dS-2-YgEKmA/featured
CYBERSECURITY PODCASTS:
- Risky Business Published weekly, the Risky Business podcast features news and in-depth commentary from security industry luminaries. Hosted by award-winning journalist Patrick Gray, Risky Business has become a must-listen digest for information security professionals. https://risky.biz/
- Pauls Security Weekly This show features interviews with folks in the security community; technical segments, which are just that, very technical; and security news, which is an open discussion forum for the hosts to express their opinions about the latest security headlines, breaches, new exploits and vulnerabilities, “not” politics, “cyber” policies and more. https://securityweekly.com/category-shows/paul-security-weekly/
- Security Now – Steve Gibson, the man who coined the term spyware and created the first anti-spyware program, creator of Spinrite and ShieldsUP, discusses the hot topics in security today with Leo Laporte. https://twit.tv/shows/security-now
- Daily Information Security Podcast (“StormCast”) Stormcasts are daily 5-10 minute information security threat updates. The podcast is produced each work day, and typically released late in the day to be ready for your morning commute. https://isc.sans.edu/podcast.html
- ShadowTalk Threat Intelligence Podcast by Digital Shadow_. The weekly podcast highlights key findings of primary-source research our Intelligence Team is conducting, along with guest speakers discussing the latest threat actors, campaigns, security events and industry news. https://resources.digitalshadows.com/threat-intelligence-podcast-shadowtalk
- Don’t Panic – The Unit 42 Podcast Don’t Panic! is the official podcast from Unit 42 at Palo Alto Networks. We find the big issues that are frustrating cyber security practitioners and help simplify them so they don’t need to panic. https://unit42.libsyn.com/
- Recorded Future Recorded Future takes you inside the world of cyber threat intelligence. We’re sharing stories from the trenches and the operations floor as well as giving you the skinny on established and emerging adversaries. We also talk current events, technical tradecraft, and offer up insights on the big picture issues in our industry. https://www.recordedfuture.com/resources/podcast/
- The Cybrary Podcast Listen in to the Cybrary Podcast where we discuss a range topics from DevSecOps and Ransomware attacks to diversity and how to retain of talent. Entrepreneurs at all stages of their startup companies join us to share their stories and experience, including how to get funding, hiring the best talent, driving sales, and choosing where to base your business. https://www.cybrary.it/info/cybrary-podcast/
- Cyber Life The Cyber Life podcast is for cyber security (InfoSec) professionals, people trying to break into the industry, or business owners looking to learn how to secure their data. We will talk about many things, like how to get jobs, cover breakdowns of hot topics, and have special guest interviews with the men and women “in the trenches” of the industry. https://redcircle.com/shows/cyber-life
- Career Notes Cybersecurity professionals share their personal career journeys and offer tips and advice in this brief, weekly podcast from The CyberWire. https://www.thecyberwire.com/podcasts/career-notes
Below podcasts Added from here: https://infosec-conferences.com/cybersecurity-podcasts/
- Down the Security Rabbithole http://podcast.wh1t3rabbit.net/ Down the Security Rabbithole is hosted by Rafal Los and James Jardine who discuss, by means of interviewing or news analysis, everything about Cybersecurity which includes Cybercrime, Cyber Law, Cyber Risk, Enterprise Risk & Security and many more. If you want to hear issues that are relevant to your organization, subscribe and tune-in to this podcast.
- The Privacy, Security, & OSINT Show https://podcasts.apple.com/us/podcast/the-privacy-security-osint-show/id1165843330 The Privacy, Security, & OSINT Show, hosted by Michael Bazzell, is your weekly dose of digital security, privacy, and Open Source Intelligence (OSINT) opinion and news. This podcast will help listeners learn some ideas on how to stay secure from cyber-attacks and help them become “digitally invisible”.
- Defensive Security Podcast https://defensivesecurity.org/ Hosted by Andrew Kalat (@lerg) and Jerry Bell (@maliciouslink), the Defensive Security Podcasts aims to look/discuss the latest security news happening around the world and pick out the lessons that can be applied to keeping organizations secured. As of today, they have more than 200 episodes and some of the topics discussed include Forensics, Penetration Testing, Incident Response, Malware Analysis, Vulnerabilities and many more.
- Darknet Diaries https://darknetdiaries.com/episode/ Darknet Diaries Podcast is hosted and produced by Jack Rhysider that discuss topics related to information security. It also features some true stories from hackers who attacked or have been attacked. If you’re a fan of the show, you might consider buying some of their souvenirs here (https://shop.darknetdiaries.com/).
- Brakeing Down Security https://www.brakeingsecurity.com/ Brakeing Down Security started in 2014 and is hosted by Bryan Brake, Brian Boettcher, and Amanda Berlin. This podcast discusses everything about the Cybersecurity world, Compliance, Privacy, and Regulatory issues that arise in today’s organizations. The hosts will teach concepts that Information Security Professionals need to know and discuss topics that will refresh the memories of seasoned veterans.
- Open Source Security Podcast https://www.opensourcesecuritypodcast.com/ Open Source Security Podcast is a podcast that discusses security with an open-source slant. The show started in 2016 and is hosted by Josh Bressers and Kurt Siefried. As of this writing, they now posted around 190+ podcasts
- Cyber Motherboard https://podcasts.apple.com/us/podcast/cyber/id1441708044 Ben Makuch is the host of the podcast CYBER and weekly talks to Motherboard reporters Lorenzo Franceschi-Bicchierai and Joseph Cox. They tackle topics about famous hackers and researchers about the biggest news in cybersecurity. The Cyber- stuff gets complicated really fast, but Motherboard spends its time fixed in the infosec world so we don’t have to.
- Hak5 https://shop.hak5.org/pages/videos Hak5 is a brand that is created by a group of security professionals, hardcore gamers and “IT ninjas”. Their podcast, which is mostly uploaded on YouTube discusses everything from open-source software to penetration testing and network infrastructure. Their channel currently has 590,000 subscribers and is one of the most viewed shows when you want to learn something about security networks.
- Threatpost Podcast Series https://threatpost.com/category/podcasts/ Threatpost is an independent news site which is a leading source of information about IT and business security for hundreds of thousands of professionals worldwide. With an award-winning editorial team produces unique and high-impact content including security news, videos, feature reports and more, with their global editorial activities are driven by industry-leading journalist Tom Spring, editor-in-chief.
- CISO-Security Vendor Relationship Podcast https://cisoseries.com Co-hosted by the creator of the CISO/Security Vendor Relationship Series, David Spark, and Mike Johnson, in 30 minutes, this weekly program challenges the co-hosts, guests, and listeners to critique, share true stories. This podcast, The CISO/Security Vendor Relationship, targets to enlighten and educate listeners on improving security buyer and seller relationships.
- Getting Into Infosec Podcast Stories of how Infosec and Cybersecurity pros got jobs in the field so you can be inspired, motivated, and educated on your journey. – https://gettingintoinfosec.com/
- Unsupervised Learning Weekly podcasts and biweekly newsletters as a curated summary intersection of security, technology, and humans, or a standalone idea to provoke thought, by Daniel Miessler. https://danielmiessler.com/podcast/
SECURITY BOOKS:
- Building Secure & Reliable Systems Best Practices for Designing, Implementing and Maintaining Systems (O’Reilly) By Heather Adkins, Betsy Beyer, Paul Blankinship, Ana Oprea, Piotr Lewandowski, Adam Stubblefield https://landing.google.com/sre/books/
- Security Engineering By Ross Anderson – A guide to building dependable distributed systems. (and Ross Anderson is brilliant //OP editorial) https://www.cl.cam.ac.uk/~rja14/book.html
- The Cyber Skill Gap By Vagner Nunes – The Cyber Skill Gap: How To Become A Highly Paid And Sought After Information Security Specialist! (Use COUPON CODE: W4VSPTW8G7 to make it free) https://payhip.com/b/PdkW
- The Beginner’s Guide to Information Security By Limor Elbaz – Offers insight and resources to help readers embark on a career in one of the 21st century’s most important—and potentially lucrative—fields. https://www.amazon.com/Beginners-Guide-Information-Security-Kickstart-ebook/dp/B01JTDDSAM
- Free Springer Textbooks Valid at least through July, Springer is providing free access to several hundred titles in its eBook collection. Books are available via SpringerLink and can be viewed online or downloaded as PDF or EBUP files. Disciplines include computer science, networking, cryptography, digital forensics, and others. https://link.springer.com/search/page/1?facet-content-type=%22Book%22&package=mat-covid19_textbooks&facet-language=%22En%22&sortOrder=newestFirst&showAll=true
- Texas A&M Security Courses The web-based courses are designed to ensure that the privacy, reliability, and integrity of the information systems that power the global economy remain intact and secure. The web-based courses are offered through three discipline-specific tracks: general, non-technical computer users; technical IT professionals; and business managers and professionals. https://teex.org/program/dhs-cybersecurity/
CYBERSECURITY TRAINING:
- WebSecurity Academy Free online web security training from the creators of Burp Suite https://portswigger.net/web-security
- Mosse Cyber Security Institute Introduction to cybersecurity free certification with 100+ hours of training, no expiry/renewals, https://www.mosse-institute.com/certifications/mics-introduction-to-cyber-security.html
- BugCrowd University Free bug hunting resources and methodologies in form of webinars, education and training. https://www.bugcrowd.com/hackers/bugcrowd-university/
- Certified Network Security Specialist Certification and training; Expires Aug 31 2020 Use coupon code #StaySafeHome during checkout to claim your free access. Offer is valid till 31/08/2020. £500.00 Value https://www.icsi.co.uk/courses/icsi-cnss-certified-network-security-specialist-covid-19
- Metasploit Unleashed Most complete and in-depth Metasploit guide available, with contributions from the authors of the No Starch Press Metasploit Book. https://www.offensive-security.com/metasploit-unleashed/
- AWS Cloud Certified Get skills in AWS to be more marketable. Training is quality and free. https://www.youtube.com/watch?v=3hLmDS179YE Have to create an AWS account, Exam is $100.
- SANS Faculty Free Tools List of OSS developed by SANS staff. https://www.sans.org/media/free/free-faculty-tools.pdf?msc=sans-free-lp
- “Using ATT&CK for Cyber Threat Intelligence Training” – 4 hour training The goal of this training is for students to understand the following: at: https://attack.mitre.org/resources/training/cti/
- Coursera -“Coursera Together: Free online learning during COVID-19” Lots of different types of free training. https://blog.coursera.org/coursera-together-free-online-learning-during-covid-19/
- Fortinet Security Appliance Training Free access to the FortiGate Essentials Training Course and Network Security Expert courses 1 and 2 https://www.fortinet.com/training/cybersecurity-professionals.html
- Chief Information Security Officer (CISO) Workshop Training – The Chief Information Security Office (CISO) workshop contains a collection of security learnings, principles, and recommendations for modernizing security in your organization. This training workshop is a combination of experiences from Microsoft security teams and learnings from customers. – https://docs.microsoft.com/en-us/security/ciso-workshop/ciso-workshop
- CLARK Center Plan C – Free cybersecurity curriculum that is primarily video-based or provide online assignments that can be easily integrated into a virtual learning environments https://clark.center/home
- Hack.me is a FREE, community based project powered by eLearnSecurity. The community can build, host and share vulnerable web application code for educational and research purposes. It aims to be the largest collection of “runnable” vulnerable web applications, code samples and CMS’s online. The platform is available without any restriction to any party interested in Web Application Security. https://hack.me/
- Hacker101 – Free classes for web security – https://www.hacker101.com/
- ElasticStack – Free on-demand Elastic Stack, observability, and security courses. https://training.elastic.co/learn-from-home
- Hoppers Roppers – Community built around a series of free courses that provide training to beginners in the security field. https://www.hoppersroppers.org/training.html
- IBM Security Learning Academy Free technical training for IBM Security products. https://www.securitylearningacademy.com/
- M.E. Kabay Free industry courses and course materials for students, teachers and others are welcome to use for free courses and lectures. http://www.mekabay.com/courses/index.htm
- Open P-TECH Free digital learning on the tech skills of tomorrow. https://www.ptech.org/open-p-tech/
- Udemy – Online learning course platform “collection from the free courses in our learning marketplace” https://www.udemy.com/courses/free/
- Enroll Now Free: PCAP Programming Essentials in Python https://www.netacad.com/courses/programming/pcap-programming-essentials-python Python is the very versatile, object-oriented programming language used by startups and tech giants, Google, Facebook, Dropbox and IBM. Python is also recommended for aspiring young developers who are interested in pursuing careers in Security, Networking and Internet-of-Things. Once you complete this course, you are ready to take the PCAP – Certified Associate in Python programming. No prior knowledge of programming is required.
- Packt Web Development Course Web Development Get to grips with the fundamentals of the modern web Unlock one year of free online access. https://courses.packtpub.com/pages/free?fbclid=IwAR1FtKQcYK8ycCmBMXaBGvW_7SgPVDMKMaRVwXYcSbiwvMfp75gazxRZlzY
- Stanford University Webinar – Hacked! Security Lessons from Big Name Breaches 50 minute cyber lecture from Stanford.You Will Learn: — The root cause of key breaches and how to prevent them; How to measure your organization’s external security posture; How the attacker lifecycle should influence the way you allocate resources https://www.youtube.com/watch?v=V9agUAz0DwI
- Stanford University Webinar – Hash, Hack, Code: Emerging Trends in Cyber Security Join Professor Dan Boneh as he shares new approaches to these emerging trends and dives deeper into how you can protect networks and prevent harmful viruses and threats. 50 minute cyber lecture from Stanford. https://www.youtube.com/watch?v=544rhbcDtc8
- Kill Chain: The Cyber War on America’s Elections (Documentary) (Referenced at GRIMMCON), In advance of the 2020 Presidential Election, Kill Chain: The Cyber War on America’s Elections takes a deep dive into the weaknesses of today’s election technology, an issue that is little understood by the public or even lawmakers. https://www.hbo.com/documentaries/kill-chain-the-cyber-war-on-americas-elections
- Intro to Cybersecurity Course (15 hours) Learn how to protect your personal data and privacy online and in social media, and why more and more IT jobs require cybersecurity awareness and understanding. Receive a certificate of completion. https://www.netacad.com/portal/web/self-enroll/c/course-1003729
- Cybersecurity Essentials (30 hours) Foundational knowledge and essential skills for all cybersecurity domains, including info security, systems sec, network sec, ethics and laws, and defense and mitigation techniques used in protecting businesses. https://www.netacad.com/portal/web/self-enroll/c/course-1003733
- Pluralsight and Microsoft Partnership to help you become an expert in Azure. With skill assessments and over 200+ courses, 40+ Skill IQs and 8 Role IQs, you can focus your time on understanding your strengths and skill gaps and learn Azure as quickly as possible.https://www.pluralsight.com/partners/microsoft/azure
- Blackhat Webcast Series Monthly webcast of varying cyber topics. I will post specific ones in the training section below sometimes, but this is worth bookmarking and checking back. They always have top tier speakers on relevant, current topics. https://www.blackhat.com/html/webcast/webcast-home.html
- Federal Virtual Training Environment – US Govt sponsored free courses. There are 6 available, no login required. They are 101 Coding for the Public, 101 Critical Infrastructure Protection for the Public, Cryptocurrency for Law Enforcement for the Public, Cyber Supply Chain Risk Management for the Public, 101 Reverse Engineering for the Public, Fundamentals of Cyber Risk Management. https://fedvte.usalearning.gov/public_fedvte.php
- Harrisburg University CyberSecurity Collection of 18 curated talks. Scroll down to CYBER SECURITY section. You will see there are 4 categories Resource Sharing, Tools & Techniques, Red Team (Offensive Security) and Blue Teaming (Defensive Security). Lot of content in here; something for everyone. https://professionaled.harrisburgu.edu/online-content/
- OnRamp 101-Level ICS Security Workshop Starts this 4/28. 10 videos, Q&A / discussion, bonus audio, great links. Get up to speed fast on ICS security. It runs for 5 weeks. 2 videos per week. Then we keep it open for another 3 weeks for 8 in total. https://onramp-3.s4xevents.com
- HackXOR WebApp CTF Hackxor is a realistic web application hacking game, designed to help players of all abilities develop their skills. All the missions are based on real vulnerabilities I’ve personally found while doing pentests, bug bounty hunting, and research. https://hackxor.net/
- Suricata Training 5-part training module using a simulation as a backdrop to teach how to use Suricata. https://rangeforce.com/resource/suricata-challenge-reg/
- flAWS System Through a series of levels you’ll learn about common mistakes and gotchas when using Amazon Web Services (AWS). Multiple levels, “Buckets” of fun. http://flaws.cloud/
- Stanford CS 253 Web Security A free course from Stanford providing a comprehensive overview of web security. The course begins with an introduction to the fundamentals of web security and proceeds to discuss the most common methods for web attacks and their countermeasures. The course includes video lectures, slides, and links to online reading assignments. https://web.stanford.edu/class/cs253
- Linux Journey A free, handy guide for learning Linux. Coverage begins with the fundamentals of command line navigation and basic text manipulation. It then extends to more advanced topics, such as file systems and networking. The site is well organized and includes many examples along with code snippets. Exercises and quizzes are provided as well. https://linuxjourney.com
- Ryan’s Tutorials A collection of free, introductory tutorials on several technology topics including: Linux command line, Bash scripting, creating and styling webpages with HTML and CSS, counting and converting between different number systems, and writing regular expressions. https://ryanstutorials.net
- The Ultimate List of SANS Cheat Sheets Massive collection of free cybersecurity cheat sheets for quick reference (login with free SANS account required for some penetration testing resources). https://www.sans.org/blog/the-ultimate-list-of-sans-cheat-sheets/
- CYBER INTELLIGENCE ANALYTICS AND OPERATIONS Learn:The ins and outs of all stages of the intelligence cycle from collection to analysis from seasoned intel professionals. How to employ threat intelligence to conduct comprehensive defense strategies to mitigate potential compromise. How to use TI to respond to and minimize impact of cyber incidents. How to generate comprehensive and actionable reports to communicate gaps in defenses and intelligence findings to decision makers. https://www.shadowscape.io/cyber-intelligence-analytics-operat
- Linux Command Line for Beginners 25 hours of training – In this course, you’ll learn from one of Fullstack’s top instructors, Corey Greenwald, as he guides you through learning the basics of the command line through short, digestible video lectures. Then you’ll use Fullstack’s CyberLab platform to hone your new technical skills while working through a Capture the Flag game, a special kind of cybersecurity game designed to challenge participants to solve computer security problems by solving puzzles. Finally, through a list of carefully curated resources through a series of curated resources, we’ll introduce you to some important cybersecurity topics so that you can understand some of the common language, concepts and tools used in the industry. https://prep.fullstackacademy.com/
- Hacking 101 6 hours of free training – First, you’ll take a tour of the world and watch videos of hackers in action across various platforms (including computers, smartphones, and the power grid). You may be shocked to learn what techniques the good guys are using to fight the bad guys (and which side is winning). Then you’ll learn what it’s like to work in this world, as we show you the different career paths open to you and the (significant) income you could make as a cybersecurity professional. https://cyber.fullstackacademy.com/prepare/hacking-101
- Choose Your Own Cyber Adventure Series: Entry Level Cyber Jobs Explained YouTube Playlist (videos from my channel #simplyCyber) This playlist is a collection of various roles within the information security field, mostly entry level, so folks can understand what different opportunities are out there. https://www.youtube.com/playlist?list=PL4Q-ttyNIRAqog96mt8C8lKWzTjW6f38F
- NETINSTRUCT.COM Free Cybersecurity, IT and Leadership Courses – Includes OS and networking basics. Critical to any Cyber job. https://netinstruct.com/courses
- HackerSploit – HackerSploit is the leading provider of free and open-source Infosec and cybersecurity training. https://hackersploit.org/
- Resources for getting started (Free and Paid)Practice
- DetectionLab (Free)
- LetsDefend.io (Free/Paid)
- DetectionLabELK (Free)
Log Analysis
- malware-traffic-analysis (Free)
- Practical Packet Analysis (Book) Chris Sanders
- Logging and Log Management by Anton A. Chuvakin , Kevin J. Schmidt (Book)
- Sigma (Tool)
- SysmonSearch (Tool)
Network Monitoring
- Applied Network Security Monitoring: Collection, Detection, and Analysis (Book)
- Open Security Training
- SANS Reading Room
Linux Distributions
- Security Onion
- The Appliance for Digital Investigation and Analysis (ADIA) https://forensics.cert.org/#ADIA
- SANS Investigative Forensic Toolkit (SIFT) Workstation
Memory Analysis Tools
Professional Training
- FOR578: Cyber Threat Intelligence (Paid)
- SEC511: Continuous Monitoring & Security Operations (Paid)
- SEC445: SIEM Design & Implementation (Paid)
- AEGIS Certification (Paid)
Conferences
- Virus Bulletin
- SANS Blue Team Summit
- Blueteamcon
CYBERSECURITY COURSES: (Multi-week w/Enrollment)
- Computer Science courses with video lectures Intent of this list is to act as Online bookmarks/lookup table for freely available online video courses. Focus would be to keep the list concise so that it is easy to browse. It would be easier to skim through 15 page list, find the course and start learning than having to read 60 pages of text. If you are student or from non-CS background, please try few courses to decide for yourself as to which course suits your learning curve best. https://github.com/Developer-Y/cs-video-courses?utm_campaign=meetedgar&utm_medium=social&utm_source=meetedgar.com
- Cryptography I -offered by Stanford University – Rolling enrollment – Cryptography is an indispensable tool for protecting information in computer systems. In this course you will learn the inner workings of cryptographic systems and how to correctly use them in real-world applications. The course begins with a detailed discussion of how two parties who have a shared secret key can communicate securely when a powerful adversary eavesdrops and tampers with traffic. We will examine many deployed protocols and analyze mistakes in existing systems. The second half of the course discusses public-key techniques that let two parties generate a shared secret key. https://www.coursera.org/learn/crypto
- Software Security Rolling enrollment -offered by University of Maryland, College Park via Coursera – This course we will explore the foundations of software security. We will consider important software vulnerabilities and attacks that exploit them — such as buffer overflows, SQL injection, and session hijacking — and we will consider defenses that prevent or mitigate these attacks, including advanced testing and program analysis techniques. Importantly, we take a “build security in” mentality, considering techniques at each phase of the development cycle that can be used to strengthen the security of software systems. https://www.coursera.org/learn/software-security
- Intro to Information Security Georgia Institute of Technology via Udacity – Rolling Enrollment. This course provides a one-semester overview of information security. It is designed to help students with prior computer and programming knowledge — both undergraduate and graduate — understand this important priority in society today. Offered at Georgia Tech as CS 6035 https://www.udacity.com/course/intro-to-information-security–ud459
- Cyber-Physical Systems Security Georgia Institute of Technology via Udacity – This course provides an introduction to security issues relating to various cyber-physical systems including industrial control systems and those considered critical infrastructure systems. 16 week course – Offered at Georgia Tech as CS 8803 https://www.udacity.com/course/cyber-physical-systems-security–ud279
- Finding Your Cybersecurity Career Path – University of Washington via edX – 4 weeks long – self paced – In this course, you will focus on the pathways to cybersecurity career success. You will determine your own incoming skills, talent, and deep interests to apply toward a meaningful and informed exploration of 32 Digital Pathways of Cybersecurity. https://www.edx.org/course/finding-your-cybersecurity-career-path
- Building a Cybersecurity Toolkit – University of Washington via edX – 4 weeks self-paced The purpose of this course is to give learners insight into these type of characteristics and skills needed for cybersecurity jobs and to provide a realistic outlook on what they really need to add to their “toolkits” – a set of skills that is constantly evolving, not all technical, but fundamentally rooted in problem-solving. https://www.edx.org/course/building-a-cybersecurity-toolkit
- Cybersecurity: The CISO’s View – University of Washington via edX – 4 weeks long self-paced – This course delves into the role that the CISO plays in cybersecurity operations. Throughout the lessons, learners will explore answers to the following questions: How does cybersecurity work across industries? What is the professionals’ point of view? How do we keep information secure https://www.edx.org/course/cybersecurity-the-cisos-view
- Introduction to Cybersecurity – University of Washington via edX – In this course, you will gain an overview of the cybersecurity landscape as well as national (USA) and international perspectives on the field. We will cover the legal environment that impacts cybersecurity as well as predominant threat actors. – https://www.edx.org/course/introduction-to-cybersecurity
- Cyber Attack Countermeasures New York University (NYU) via Coursera – This course introduces the basics of cyber defense starting with foundational models such as Bell-LaPadula and information flow frameworks. These underlying policy enforcements mechanisms help introduce basic functional protections, starting with authentication methods. Learners will be introduced to a series of different authentication solutions and protocols, including RSA SecureID and Kerberos, in the context of a canonical schema. – https://www.coursera.org/learn/cyber-attack-countermeasures
- Introduction to Cyber Attacks New York University (NYU) via Coursera – This course provides learners with a baseline understanding of common cyber security threats, vulnerabilities, and risks. An overview of how basic cyber attacks are constructed and applied to real systems is also included. Examples include simple Unix kernel hacks, Internet worms, and Trojan horses in software utilities. Network attacks such as distributed denial of service (DDOS) and botnet- attacks are also described and illustrated using real examples from the past couple of decades. https://www.coursera.org/learn/intro-cyber-attacks
- Enterprise and Infrastructure Security New York University (NYU) via Coursera – This course introduces a series of advanced and current topics in cyber security, many of which are especially relevant in modern enterprise and infrastructure settings. The basics of enterprise compliance frameworks are provided with introduction to NIST and PCI. Hybrid cloud architectures are shown to provide an opportunity to fix many of the security weaknesses in modern perimeter local area networks. https://www.coursera.org/learn/enterprise-infrastructure-security
- Network Security Georgia Institute of Technology via Udacity – This course provides an introduction to computer and network security. Students successfully completing this class will be able to evaluate works in academic and commercial security, and will have rudimentary skills in security research. The course begins with a tutorial of the basic elements of cryptography, cryptanalysis, and systems security, and continues by covering a number of seminal papers and monographs in a wide range of security areas. – https://www.udacity.com/course/network-security–ud199
- Real-Time Cyber Threat Detection and Mitigation – New York University (NYU) via Coursera This course introduces real-time cyber security techniques and methods in the context of the TCP/IP protocol suites. Explanation of some basic TCP/IP security hacks is used to introduce the need for network security solutions such as stateless and stateful firewalls. Learners will be introduced to the techniques used to design and configure firewall solutions such as packet filters and proxies to protect enterprise assets. https://www.coursera.org/learn/real-time-cyber-threat-detection
CYBERSECURITY JOBS:
CYBERSECURITY Cheat sheets
- Privilege-Escalation: This cheasheet is aimed at the CTF Players and Beginners to help them understand the fundamentals of Privilege Escalation with examples. https://github.com/Ignitetechnologies/Privilege-Escalation
- Malware analysis tools and resources. https://github.com/rshipp/awesome-malware-analysis
- Analyzing Malicious Documents Cheat Sheet https://zeltser.com/analyzing-malicious-documents/
- ReverseEngineering Cheat Sheet https://www.cybrary.it/wp-content/uploads/2017/11/cheat-sheet-reverse-v6.png
- SQL Injection | Various DBs http://pentestmonkey.net/category/cheat-sheet/sql-injection
- Nmap Cheat Sheet and Pro Tips https://hackertarget.com/nmap-cheatsheet-a-quick-reference-guide/
- PENTESTING LocalFileInclude Cheat Sheet https://highon.coffee/blog/lfi-cheat-sheet/
- Penetration Testing Tools Cheat Sheet https://highon.coffee/blog/penetration-testing-tools-cheat-sheet/
- Reverse Shell Cheat Sheet https://highon.coffee/blog/reverse-shell-cheat-sheet/
- nbtscan Cheat Sheet https://highon.coffee/blog/nbtscan-cheat-sheet/
- Linux Commands Cheat Sheet https://highon.coffee/blog/linux-commands-cheat-sheet/
- Kali Linux Cheat Sheet https://i.redd.it/9bu827i9tr751.jpg
- Hacking Tools Cheat Sheet (Diff tools) https://i.redd.it/fviaw8s43q851.jpg
- Google Search Operators: The Complete List (42 Advanced Operators) https://ahrefs.com/blog/google-advanced-search-operators/
- (Multiple) (Good) Cheat Sheets – Imgur https://imgur.com/gallery/U5jqgik
- Active-Directory-Exploitation-Cheat-Sheet: A cheat sheet that contains common enumeration and attack methods for Windows Active Directory. https://github.com/S1ckB0y1337/Active-Directory-Exploitation-Cheat-Sheet
- Shodan Query Filters https://github.com/JavierOlmedo/shodan-filters
- Getting Real with XSS – A reference on the new technquies to XSS https://labs.f-secure.com/blog/getting-real-with-xss/
SANS Massive List of Cheat Sheets Curated from here: https://www.sans.org/blog/the-ultimate-list-of-sans-cheat-sheets/
General IT Security * Windows and Linux Terminals & Command Lines https://assets.contentstack.io/v3/assets/blt36c2e63521272fdc/bltea7de5267932e94b/5eb08aafcf88d36e47cf0644/Cheatsheet_SEC301-401_R7.pdf
- TCP/IP and tcpdump https://www.sans.org/security-resources/tcpip.pdf?msc=Cheat+Sheet+Blog
- IPv6 Pocket Guide https://www.sans.org/security-resources/ipv6_tcpip_pocketguide.pdf?msc=Cheat+Sheet+Blog
- Powershell Cheat Sheet https://assets.contentstack.io/v3/assets/blt36c2e63521272fdc/bltf146e4f361db3938/5e34a7bc946d717e2eab6139/power-shell-cheat-sheet-v41.pdf
- Writing Tips for IT Professionals https://zeltser.com/writing-tips-for-it-professionals/
- Tips for Creating and Managing New IT Products https://zeltser.com/new-product-management-tips/
- Tips for Getting the Right IT Job https://zeltser.com/getting-the-right-it-job-tips/
- Tips for Creating a Strong Cybersecurity Assessment Report https://zeltser.com/security-assessment-report-cheat-sheet/
- Critical Log Review Checklist for Security Incidents https://zeltser.com/security-incident-log-review-checklist/
- Security Architecture Cheat Sheet for Internet Applications https://zeltser.com/security-architecture-cheat-sheet/
- Tips for Troubleshooting Human Communications https://zeltser.com/human-communications-cheat-sheet/
- Security Incident Survey Cheat Sheet for Server Administrators https://zeltser.com/security-incident-survey-cheat-sheet/
- Network DDoS Incident Response Cheat Sheet https://zeltser.com/ddos-incident-cheat-sheet/
- Information Security Assessment RFP Cheat Sheet https://zeltser.com/cheat-sheets/
Digital Forensics and Incident Response
- SIFT Workstation Cheat Sheet https://digital-forensics.sans.org/media/sift_cheat_sheet.pdf?msc=Cheat+Sheet+Blog
- Plaso Filtering Cheat Sheet https://digital-forensics.sans.org/media/Plaso-Cheat-Sheet.pdf?msc=Cheat+Sheet+Blog
- Tips for Reverse-Engineering Malicious Code https://digital-forensics.sans.org/media/reverse-engineering-malicious-code-tips.pdf?msc=Cheat+Sheet+Blog
- REMnux Usage Tips for Malware Analysis on Linux https://digital-forensics.sans.org/media/remnux-malware-analysis-tips.pdf?msc=Cheat+Sheet+Blog
- Analyzing Malicious Documents https://digital-forensics.sans.org/media/analyzing-malicious-document-files.pdf?msc=Cheat+Sheet+Blog
- Malware Analysis and Reverse-Engineering Cheat Sheet https://digital-forensics.sans.org/media/malware-analysis-cheat-sheet.pdf?msc=Cheat+Sheet+Blog
- SQlite Pocket Reference Guide https://digital-forensics.sans.org/media/SQlite-PocketReference-final.pdf?msc=Cheat+Sheet+Blog
- Eric Zimmerman’s tools Cheat Sheet https://digital-forensics.sans.org/media/EricZimmermanCommandLineToolsCheatSheet-v1.0.pdf?msc=Cheat+Sheet+Blog
- Rekall Memory Forensics Cheat Sheet https://digital-forensics.sans.org/media/rekall-memory-forensics-cheatsheet.pdf?msc=Cheat+Sheet+Blog
- Linux Shell Survival Guide https://digital-forensics.sans.org/media/linux-shell-survival-guide.pdf?msc=Cheat+Sheet+Blog
- Windows to Unix Cheat Sheet https://digital-forensics.sans.org/media/windows_to_unix_cheatsheet.pdf?msc=Cheat+Sheet+Blog
- Memory Forensics Cheat Sheet https://digital-forensics.sans.org/media/volatility-memory-forensics-cheat-sheet.pdf?msc=Cheat+Sheet+Blog
- Hex and Regex Forensics Cheat Sheet https://digital-forensics.sans.org/media/hex_file_and_regex_cheat_sheet.pdf?msc=Cheat+Sheet+Blog
- FOR518 Mac & iOS HFS+ Filesystem Reference Sheet https://assets.contentstack.io/v3/assets/blt36c2e63521272fdc/blt61c336e02577e733/5eb0940e248a28605479ccf0/FOR518_APFS_CheatSheet_012020.pdf
- The majority of DFIR Cheat Sheets can be found here –> https://digital-forensics.sans.org/community/cheat-sheets?msc=Cheat+Sheet+Blog.
Penetration Testing * Swiss Army Knife collection of PenTesting Cheatsheets https://github.com/swisskyrepo/PayloadsAllTheThings
- SQLite Injection Cheat Sheet https://github.com/unicornsasfuel/sqlite_sqli_cheat_sheet
- SSL/TLS Vulnerability Cheat Sheet https://github.com/IBM/tls-vuln-cheatsheet
- Windows Intrusion Discovery Cheat Sheet v3.0 https://pen-testing.sans.org/retrieve/windows-cheat-sheet.pdf?msc=Cheat+Sheet+Blog
- Intrusion Discovery Cheat Sheet v2.0 (Linux) https://pen-testing.sans.org/retrieve/linux-cheat-sheet.pdf?msc=Cheat+Sheet+Blog
- Intrusion Discovery Cheat Sheet v2.0 (Windows 2000) https://assets.contentstack.io/v3/assets/blt36c2e63521272fdc/bltd6fa777a3215f34a/5eb08aae08d37e6d82ef77fe/win2ksacheatsheet.pdf
- Windows Command Line https://pen-testing.sans.org/retrieve/windows-command-line-sheet.pdf?msc=Cheat+Sheet+Blog
- Netcat Cheat Sheet https://pen-testing.sans.org/retrieve/netcat-cheat-sheet.pdf?msc=Cheat+Sheet+Blog
- Misc Tools Cheat Sheet https://pen-testing.sans.org/retrieve/misc-tools-sheet.pdf?msc=Cheat+Sheet+Blog
- Python 3 Essentials https://www.sans.org/blog/sans-cheat-sheet-python-3/?msc=Cheat+Sheet+Blog
- Windows Command Line Cheat Sheet https://assets.contentstack.io/v3/assets/blt36c2e63521272fdc/blt4e45e00c2973546d/5eb08aae4461f75d77a48fd4/WindowsCommandLineSheetV1.pdf
- SMB Access from Linux Cheat Sheet https://assets.contentstack.io/v3/assets/blt36c2e63521272fdc/blta6a2ae64ec0ed535/5eb08aaeead3926127b4df44/SMB-Access-from-Linux.pdf
- Pivot Cheat Sheet https://assets.contentstack.io/v3/assets/blt36c2e63521272fdc/blt0f228a4b9a1165e4/5ef3d602395b554cb3523e7b/pivot-cheat-sheet-v1.0.pdf
- Google Hacking and Defense Cheat Sheet https://www.sans.org/security-resources/GoogleCheatSheet.pdf?msc=Cheat+Sheet+Blog
- Scapy Cheat Sheet https://wiki.sans.blue/Tools/pdfs/ScapyCheatSheet_v0.2.pdf
- Nmap Cheat Sheet https://assets.contentstack.io/v3/assets/blt36c2e63521272fdc/blte37ba962036d487b/5eb08aae26a7212f2db1c1da/NmapCheatSheetv1.1.pdf
Cloud Security Cheat sheets
- Multicloud Cheat Sheet https://www.sans.org/security-resources/posters/cloud/multicloud-cheat-sheet-215?msc=blog-ultimate-list-cheat-sheets
CYBERSECURITY Q&A
AWS Certified Developer A. PRO
Source: What is the best cheap Wi-Fi cracking/hacking adapter?
Hey everyone, I’ve started getting into hacking, and would like to know the cheapest but best Wi-Fi cracking/deauthing/hacking adapter. I’m on a fairly tight budget of 20AUD and am willing to compromise if needed. Priority is a card with monitor mode, then cracking capabilities, then deauthing, etc. Thank you guys! By the way, if there are any beginner tips you are willing to give, please let me know!
How SSL Certificates Work
- A browser or server attempts to connect to a website (i.e. a web server) secured with SSL. The browser/server requests that the web server identify itself.
- The web server sends the browser/server a copy of its SSL certificate.
- The browser/server checks to see whether or not it trusts the SSL certificate. If so, it sends a message to the web server.
- The web server sends back a digitally signed acknowledgement to start an SSL encrypted session.
- Encrypted data is shared between the browser/server and the web server.
There are many benefits to using SSL certificates. Namely, SSL customers can:
- Utilize HTTPs, which elicits a stronger Google ranking
- Create safer experiences for your customers
- Build customer trust and improve conversions
- Protect both customer and internal data
- Encrypt browser-to-server and server-to-server communication
- Increase security of your mobile and cloud apps
Penetration Testing Terms
Penetration Testing Terms to know:
- Authentication — The process of checking if a user is allowed to gain access to a system. eg. Login forms with username and password.
- Authorization — Checking if the authenticated user has access to perform an action. eg. user, admin, super admin roles.
- Audit — Conduct a complete inspection of an organization’s network to find vulnerable endpoints or malicious software.
- Access Control List — A list that contains users and their level of access to a system.
- Aircrack-ng — Wifi penetration testing software suite. Contains sniffing, password cracking, and general wireless attacking tools.
- Backdoor — A piece of code that lets hackers get into the system easily after it has been compromised.
- Burp Suite — Web application security software, helps test web apps for vulnerabilities. Used in bug bounty hunting.
- Banner Grabbing — Capturing basic information about a server like the type of web server software (eg. apache) and services running on it.
- Botnet — A network of computers controlled by a hacker to perform attacks such as Distributed Denial of Service.
- Brute-Force Attack — An attack where the hacker tries different login combinations to gain access. eg. trying to crack a 9 -digit numeric password by trying all the numbers from 000000000 to 999999999
- Buffer Overflow — When a program tries to store more information than it is allowed to, it overflows into other buffers (memory partitions) corrupting existing data.
- Cache — Storing the response to a particular operation in temporary high-speed storage is to serve other incoming requests better. eg. you can store a database request in a cache till it is updated to reduce calling the database again for the same query.
- Cipher — Cryptographic algorithm for encrypting and decrypting data.
- Code Injection — Injecting malicious code into a system by exploiting a bug or vulnerability.
- Cross-Site Scripting — Executing a script on the client-side through a legitimate website. This can be prevented if the website sanitizes user input.
- Compliance — A set of rules defined by the government or other authorities on how to protect your customer’s data. Common ones include HIPAA, PCI-DSS, and FISMA.
- Dictionary Attack — Attacking a system with a pre-defined list of usernames and passwords. eg. admin/admin is a common username/password combination used by amateur sysadmins.
- Dumpster Diving — Looking into a company’s trash cans for useful information.
- Denial of Service & Distributed Denial of Service — Exhausting a server’s resources by sending too many requests is Denial of Service. If a botnet is used to do the same, its called Distributed Denial of Service.
- DevSecOps — Combination of development and operations by considering security as a key ingredient from the initial system design.
- Directory Traversal — Vulnerability that lets attackers list al the files and folders within a server. This can include system configuration and password files.
- Domain Name System (DNS) — Helps convert domain names into server IP addresses. eg. Google.com -> 216.58.200.142
- DNS Spoofing — Trikcnig a system’s DNS to point to a malicious server. eg. when you enter ‘facebook.com’, you might be redirected to the attacker’s website that looks like Facebook.
- Encryption — Encoding a message with a key so that only the parties with the key can read the message.
- Exploit — A piece of code that takes advantage of a vulnerability in the target system. eg. Buffer overflow exploits can get you to root access to a system.
- Enumeration — Mapping out all the components of a network by gaining access to a single system.
- Footprinting — Gathering information about a target using active methods such as scanning and enumeration.
- Flooding — Sending too many packets of data to a target system to exhaust its resources and cause a Denial of Service or similar attacks.
- Firewall — A software or hardware filter that can be configured to prevent common types of attacks.
- Fork Bomb — Forking a process indefinitely to exhaust system resources. Related to a Denial of Service attack.
- Fuzzing — Sending automated random input to a software program to test its exception handling capacity.
- Hardening — Securing a system from attacks like closing unused ports. Usually done using scripts for servers.
- Hash Function — Mapping a piece of data into a fixed value string. Hashes are used to confirm data integrity.
- Honey Pot — An intentionally vulnerable system used to lure attackers. This is then used to understand the attacker’s strategies.
- HIPAA — The Health Insurance Portability and Accountability Act. If you are working with healthcare data, you need to make sure you are HIPAA compliant. This is to protect the customer’s privacy.
- Input Validation — Checking user inputs before sending them to the database. eg. sanitizing form input to prevent SQL injection attacks.
- Integrity — Making sure the data that was sent from the server is the same that was received by the client. This ensures there was no tampering and integrity is achieved usually by hashing and encryption.
- Intrusion Detection System — A software similar to a firewall but with advanced features. Helps in defending against Nmap scans, DDoS attacks, etc.
- IP Spoofing — Changing the source IP address of a packet to fool the target into thinking a request is coming from a legitimate server.
- John The Ripper — Brilliant password cracking tool, runs on all major platforms.
- Kerberos — Default authorization software used by Microsoft, uses a stronger encryption system.
- KeyLogger — A software program that captures all keystrokes that a user performs on the system.
- Logic Bombs — A piece of code (usually malicious) that runs when a condition is satisfied.
- Light Weight Directory Access Protocol (LDAP) — Lightweight client-server protocol on Windows, central place for authentication. Stores usernames and passwords to validate users on a network.
- Malware — Short for “Malicious Software”. Everything from viruses to backdoors is malware.
- MAC Address — Unique address assigned to a Network Interface Card and is used as an identifier for local area networks. Easy to spoof.
- Multi-factor Authentication — Using more than one method of authentication to access a service. eg. username/password with mobile OTP to access a bank account (two-factor authentication)
- MD5 — Widely used hashing algorithm. Once a favorite, it has many vulnerabilities.
- Metasploit — All in one penetration testing framework that helps to successfully exploit vulnerabilities and gain access to target systems.
- Meterpreter — An advanced Metasploit payload that lives in memory and hard to trace.
- Null-Byte Injection — An older exploit, uses null bytes (i.e. %00, or 0x00 in hexadecimal) to URLs. This makes web servers return random/unwanted data which might be useful for the attacker. Easily prevented by doing sanity checks.
- Network Interface Card(NIC) — Hardware that helps a device connect to a network.
- Network Address Translation — Utility that translates your local IP address into a global IP address. eg. your local IP might be 192.168.1.4 but to access the internet, you need a global IP address (from your router).
- Nmap — Popular network scanning tool that gives information about systems, open ports, services, and operating system versions.
- Netcat — Simple but powerful tool that can view and record data on a TCP or UDP network connections. Since it is not actively maintained, NCat is preferred.
- Nikto — A popular web application scanner, helps to find over 6700 vulnerabilities including server configurations and installed web server software.
- Nessus — Commercial alternative to NMap, provides a detailed list of vulnerabilities based on scan results.
- Packet — Data is sent and received by systems via packets. Contains information like source IP, destination IP, protocol, and other information.
- Password Cracking — Cracking an encrypted password using tools like John the Ripper when you don’t have access to the key.
- Password Sniffing — Performing man-in-the-middle attacks using tools like Wireshark to find password hashes.
- Patch — A software update released by a vendor to fix a bug or vulnerability in a software system.
- Phishing — Building fake web sites that look remarkably similar to legitimate websites (like Facebook) to capture sensitive information.
- Ping Sweep — A technique that tries to ping a system to see if it is alive on the network.
- Public Key Cryptography — Encryption mechanism that users a pair of keys, one private and one public. The sender will encrypt a message using your public key which then you can decrypt using your private key.
- Public Key Infrastructure — A public key infrastructure (PKI) is a system to create, store, and distribute digital certificates. This helps sysadmins verify that a particular public key belongs to a certain authorized entity.
- Personally Identifiable Information (PII) — Any information that identified a user. eg. Address, Phone number, etc.
- Payload — A piece of code (usually malicious) that performs a specific function. eg. Keylogger.
- PCI-DSS — Payment Card Industry Data Security Standard. If you are working with customer credit cards, you should be PCI-DSS compliant.
- Ransomware — Malware that locks your system using encryption and asks you to pay a price to get the key to unlock it.
- Rainbow Table — Pre calculated password hashes that will help you crack password hashes of the target easily.
- Reconnaissance — Finding data about the target using methods such as google search, social media, and other publicly available information.
- Reverse Engineering — Rebuilding a piece of software based on its functions.
- Role-Based Access — Providing a set of authorizations for a role other than a user. eg. “Managers” role will have a set of permissions while the “developers” role will have a different set of permissions.
- Rootkit — A rootkit is a malware that provides unauthorized users admin privileges. Rootkits include keyloggers, password sniffers, etc.
- Scanning — Sending packets to a system and gaining information about the target system using the packets received. This involved the 3-way-handshake.
- Secure Shell (SSH) — Protocol that establishes an encrypted communication channel between a client and a server. You can use ssh to login to remote servers and perform system administration.
- Session — A session is a duration in which a communication channel is open between a client and a server. eg. the time between logging into a website and logging out is a session.
- Session Hijacking — Taking over someone else’s session by pretending to the client. This is achieved by stealing cookies and session tokens. eg. after you authenticate with your bank, an attacker can steal your session to perform financial transactions on your behalf.
- Social Engineering — The art of tricking people into making them do something that is not in their best interest. eg. convincing someone to provide their password over the phone.
- Secure Hashing Algorithm (SHA) — Widely used family of encryption algorithms. SHA256 is considered highly secure compared to earlier versions like SHA 1. It is also a one-way algorithm, unlike an encryption algorithm that you can decrypt. Once you hash a message, you can only compare with another hash, you cannot re-hash it to its earlier format.
- Sniffing — performing man-in-the-middle attacks on networks. Includes wired and wireless networks.
- Spam — Unwanted digital communication, including email, social media messages, etc. Usually tries to get you into a malicious website.
- Syslog — System logging protocol, used by system administrators to capture all activity on a server. Usually stored on a separate server to retain logs in the event of an attack.
- Secure Sockets Layer (SSL) — Establishes an encrypted tunnel between the client and server. eg. when you submit passwords on Facebook, only the encrypted text will be visible for sniffers and not your original password.
- Snort — Lightweight open-source Intrusion Detection System for Windows and Linux.
- SQL Injection — A type of attack that can be performed on web applications using SQL databases. Happens when the site does not validate user input.
- Trojan — A malware hidden within useful software. eg. a pirated version of MS office can contain trojans that will execute when you install and run the software.
- Traceroute — Tool that maps the route a packet takes between the source and destination.
- Tunnel — Creating a private encrypted channel between two or more computers. Only allowed devices on the network can communicate through this tunnel.
- Virtual Private Network — A subnetwork created within a network, mainly to encrypt traffic. eg. connecting to a VPN to access a blocked third-party site.
- Virus — A piece of code that is created to perform a specific action on the target systems. A virus has to be triggered to execute eg. autoplaying a USB drive.
- Vulnerability — A point of attack that is caused by a bug / poor system design. eg. lack of input validation causes attackers to perform SQL injection attacks on a website.
- War Driving — Travelling through a neighborhood looking for unprotected wifi networks to attack.
- WHOIS — Helps to find information about IP addresses, its owners, DNS records, etc.
- Wireshark — Open source program to analyze network traffic and filter requests and responses for network debugging.
- Worm — A malware program capable of replicating itself and spreading to other connected systems. eg. a worm to built a botnet. Unlike Viruses, Worms don’t need a trigger.
- Wireless Application Protocol (WAP) — Protocol that helps mobile devices connect to the internet.
- Web Application Firewall (WAF) — Firewalls for web applications that help with cross-site scripting, Denial of Service, etc.
- Zero-Day — A newly discovered vulnerability in a system for which there is no patch yet. Zero-day vulnerabilities are the most dangerous type of vulnerabilities since there is no possible way to protect against one.
- Zombie — A compromised computer, controlled by an attacker. A group of zombies is called a Botnet.
CyberSecurity Post COVID-19
How does Covid19 affect cyber risk?
- Increased distributed working: With organizations embracing work from home, incremental risks have been observed due to a surge in Bring Your Own Device (BYOD), Virtual Private Network (VPN), Software As A Service (SaaS), O365 and Shadow IT, as it could be exploited by various Man-in-the-Middle (MITM) attack vectors.
- Reimagine Business Models: Envisioning new business opportunities, modes of working, and renewed investment priorities. With reduced workforce capability, compounded with skill shortages, staff who are focusing on business as usual tasks can be victimized, via social engineering.
- Digital Transformation and new digital infrastructure: With the change in nature for organizations across the industrial and supply chain sector – security is deprioritized. Hardening of the industrial systems and cloud based infrastructure is crucial as cyber threats exploit these challenges via vulnerability available for unpatched systems.
- With an extreme volume of digital communication, security awareness is lowered with increased susceptibility. Malicious actors are using phishing techniques to exploit such situations.
Re-evaluate your approach to cyber
-
- Which cyber scenarios your organization appears to be preparing for or is prepared?
-
- Is there a security scenario that your organization is currently ignoring – but shouldn’t be?
-
- What would your organization need to do differently in order to win, in each of the identified cyber scenarios?
- What capabilities, cyber security partnerships, and workforce strategies do you need to strengthen?
The organizations should reflect the following scenarios at a minimum and consider:
-
- Which cyber scenarios your organization appears to be preparing for or is prepared?
-
- Is there a security scenario that your organization is currently ignoring – but shouldn’t be?
-
- What would your organization need to do differently in order to win, in each of the identified cyber scenarios?
-
- What capabilities, cyber security partnerships, and workforce strategies do you need to strengthen?
- To tackle the outcome from the above scenarios, the following measures are the key:
Inoculation through education: Educate and / or remind your employees about –
-
- Your organization’s defense – remote work cyber security policies and best practices
-
- Potential threats to your organization and how will it attack – with a specific focus on social engineering scams and identifying COVID-19 phishing campaigns
- Assisting remote employees with enabling MFA across the organization assets
Adjust your defenses: Gather cyber threat intelligence and execute a patching sprint:
-
- Set intelligence collection priorities
-
- Share threat intelligence with other organizations
-
- Use intelligence to move at the speed of the threat
- Focus on known tactics, such as phishing and C-suite fraud.
-
Prioritize unpatched critical systems and common vulnerabilities.
Enterprise recovery: If the worst happens and an attack is successful, follow a staged approach to recovering critical business operations which may include tactical items such as:
-
- Protect key systems through isolation
-
- Fully understand and contain the incident
-
- Eradicate any malware
-
- Implement appropriate protection measures to improve overall system posture
-
- Identify and prioritize the recovery of key business processes to deliver operations
- Implement a prioritized recovery plan
Cyber Preparedness and Response: It is critical to optimize the detection capability thus, re-evaluation of the detection strategy aligned with the changing landscape is crucial. Some key trends include:
-
- Secure and monitor your cloud environments and remote working applications
-
- Increase monitoring to identify threats from shadow IT
- Analyze behavior patterns to improve detection content
Finding the right cyber security partner: To be ready to respond identify the right partner with experience and skillset in Social Engineering, Cyber Response, Cloud Security, and Data Security.
Critical actions to address
At this point, as the organizations are setting the direction towards the social enterprise, it is an unprecedented opportunity to lead with cyber discussions and initiatives. Organizations should immediately gain an understanding of newly introduced risks and relevant controls by:
-
- Getting a seat at the table
-
- Understanding the risk prioritization:
-
- Remote workforce/technology performance
-
- Operational and financial implications
-
- Emerging insider and external threats
- Business continuity capabilities
Assessing cyber governance and security awareness in the new operating environment
Assessing the highest areas of risk and recommend practical mitigation strategies that minimize impact to constrained resources.
Keeping leadership and the Board apprised of ever-changing risk profile
Given the complexity of the pandemic and associated cyber challenges, there is reason to believe that the recovery phase post-COVID-19 will require unprecedented levels of cyber orchestration, communication, and changing of existing configurations across the organization.
CyberSecurity: Protect Yourself on Internet
-
- Use two factor authentication when possible. If not possible, use strong unique passwords that are difficult to guess or crack. This means avoiding passwords that use of common words, your birthdate, your SSN, names and birthdays of close associates, etc.
-
- Make sure the devices you are using are up-to-date and have some form of reputable anti-virus/malware software installed.
-
- Never open emails, attachments, programs unless they are from a trusted source (i.e., a source that can be verified). Also disregard email or web requests that ask you to share your personal or account information unless you are sure the request and requestor are legitimate.
-
- Try to only use websites that are encrypted. To do this, look for either the trusted security lock symbol before the website address and/or the extra “s” at the end of http in the URL address bar.
-
- Avoid using an administrator level account when using the internet.
-
- Only enable cookies when absolutely required by a website.
-
- Make social media accounts private or don’t use social media at all.
-
- Consider using VPNs and encrypting any folders/data that contains sensitive data.
- Stay away from using unprotected public Wi-Fi networks.
-
-
Social media is genetically engineered in Area 51 to harvest as much data from you as possible. Far beyond just having your name and age and photograph.
-
-
-
Never use the same username twice anywhere, or the same password twice anywhere.
-
-
-
Use Tor/Tor Browser whenever possible. It’s not perfect, but it is a decent default attempt at anonymity.
-
-
-
Use a VPN. Using VPN and Tor can be even better.
-
-
-
Search engines like DuckDuckGo offer better privacy (assuming they’re honest, which you can never be certain of) than Google which, like social media, works extremely hard to harvest every bit of data from you that they can.
-
-
-
Never give your real details anywhere. Certainly not things like your name or pictures of yourself, but even less obvious things like your age or country of origin. Even things like how you spell words and grammatical quirks can reveal where you’re from.
-
-
-
Erase your comments from websites after a few days/weeks. It might not erase them from the website’s servers, but it will at least remove them from public view. If you don’t, you can forget they exist and you never know how or when they can and will be used against you.
-
-
With Reddit, you can create an account fairly easily over Tor using no real information. Also, regularly nuke your accounts in case Reddit or some crazy stalker is monitoring your posts to build a profile of who you might be. Source: Reddit
Notable Hackers
- Adrian Lamo – gained media attention for breaking into several high-profile computer networks, including those of The New York Times, Yahoo!, and Microsoft, culminating in his 2003 arrest. Lamo was best known for reporting U.S. soldier Chelsea Manning to Army criminal investigators in 2010 for leaking hundreds of thousands of sensitive U.S. government documents to WikiLeaks.
- Albert Gonzales – an American computer hacker and computer criminal who is accused of masterminding the combined credit card theft and subsequent reselling of more than 170 million card and ATM numbers from 2005 to 2007: the biggest such fraud in history.
- Andrew Auernheimer (known as Weev) – Went to jail for using math against AT&T website.
- Barnaby Jack – was a New Zealand hacker, programmer and computer security expert. He was known for his presentation at the Black Hat computer security conference in 2010, during which he exploited two ATMs and made them dispense fake paper currency on the stage. Among his other most notable works were the exploitation of various medical devices, including pacemakers and insulin pumps.
- Benjamin Delpy – Mimikatz
- DVD-Jon – He wrote the DeCSS software, which decodes the Content Scramble System used for DVD licensing enforcement.
- Eric Corley (known as Emmanuel Goldstein) – 2600
- Gary McKinnon – a Scottish systems administrator and hacker who was accused in 2002 of perpetrating the “biggest military computer hack of all time,” although McKinnon himself states that he was merely looking for evidence of free energy suppression and a cover-up of UFO activity and other technologies potentially useful to the public. 👽🛸
- George Hotz aka geohot – “The former Facebook engineer took on the giants of the tech world by developing the first iPhone carrier-unlock techniques,” says Mark Greenwood, head of data science at Netacea, “followed a few years later by reverse engineering Sony’s PlayStation 3, clearing the way for users to run their own code on locked-down hardware. George sparked an interest in a younger generation frustrated with hardware and software restrictions being imposed on them and led to a new scene of opening up devices, ultimately leading to better security and more openness.”
- Guccifer 2.0 – a persona which claimed to be the hacker(s) that hacked into the Democratic National Committee (DNC) computer network and then leaked its documents to the media, the website WikiLeaks, and a conference event.
- Hector Monsegur (known as Sabu) – an American computer hacker and co-founder of the hacking group LulzSec. He Monsegur became an informant for the FBI, working with the agency for over ten months to aid them in identifying the other hackers from LulzSec and related groups.
- Jacob Appelbaum – an American independent journalist, computer security researcher, artist, and hacker. He has been employed by the University of Washington, and was a core member of the Tor project, a free software network designed to provide online anonymity.
- James Forshaw – one of the world’s foremost bug bounty huners
- Jeanson James Ancheta – On May 9, 2006, Jeanson James Ancheta (born 1985) became the first person to be charged for controlling large numbers of hijacked computers or botnets.
- Jeremy Hammond – He was convicted of computer fraud in 2013 for hacking the private intelligence firm Stratfor and releasing data to the whistle-blowing website WikiLeaks, and sentenced to 10 years in prison.
- John Draper – also known as Captain Crunch, Crunch or Crunchman (after the Cap’n Crunch breakfast cereal mascot), is an American computer programmer and former legendary phone phreak.
- Kevin Mitnick – Free Kevin
- Kimberley Vanvaeck (known as Gigabyte) – a virus writer from Belgium known for a long-standing dispute which involved the internet security firm Sophos and one of its employees, Graham Cluley. Vanvaeck wrote several viruses, including Quis, Coconut and YahaSux (also called Sahay). She also created a Sharp virus (also called “Sharpei”), credited as being the first virus to be written in C#.
- Lauri Love – a British activist charged with stealing data from United States Government computers including the United States Army, Missile Defense Agency, and NASA via computer intrusion.
- Michael Calce (known as MafiaBoy) – a security expert from Île Bizard, Quebec who launched a series of highly publicized denial-of-service attacks in February 2000 against large commercial websites, including Yahoo!, Fifa.com, Amazon.com, Dell, Inc., E*TRADE, eBay, and CNN.
- Mudge – Peiter C. Zatko, better known as Mudge, is a network security expert, open source programmer, writer, and a hacker. He was the most prominent member of the high-profile hacker think tank the L0pht as well as the long-lived computer and culture hacking cooperative the Cult of the Dead Cow.
- Phineas Fisher – vigilante hacker god
- PRAGMA – Also known as Impragma or PHOENiX, PRAGMA is the author of Snipr, one of the most prolific credential stuffing tools available online.
- The 414s – The 414s were a group of computer hackers who broke into dozens of high-profile computer systems, including ones at Los Alamos National Laboratory, Sloan-Kettering Cancer Center, and Security Pacific Bank, in 1982 and 1983.
- The Shadow Brokers – is a hacker group who first appeared in the summer of 2016. They published several leaks containing hacking tools from the National Security Agency (NSA), including several zero-day exploits. Specifically, these exploits and vulnerabilities targeted enterprise firewalls, antivirus software, and Microsoft products.[6] The Shadow Brokers originally attributed the leaks to the Equation Group threat actor, who have been tied to the NSA’s Tailored Access Operations unit.
Notable Viruses & Worms
- Anna Kournikova
- Blaster
- Code Red
- Conficker
- ILOVEYOU virus
- Melissa virus
- Morris Worm
- MyDoom
- Santy
- Slammer
- Storm Worm
- Stuxnet
- WannaCry virus
- Welchia
History
- The Strange History of Ransomware
The first ransomware virus predates e-mail, even the Internet as we know it, and was distributed on floppy disk by the postal service. It sounds quaint, but in some ways this horse-and-buggy version was even more insidious than its modern descendants. Contemporary ransomware tends to bait victims using legitimate-looking email attachments — a fake invoice from UPS, or a receipt from Delta airlines. But the 20,000 disks dispatched to 90 countries in December of 1989 were masquerading as something far more evil: AIDS education software.
How to protect sensitive data for its entire lifecycle in AWS

You can protect data in-transit over individual communications channels using transport layer security (TLS), and at-rest in individual storage silos using volume encryption, object encryption or database table encryption. However, if you have sensitive workloads, you might need additional protection that can follow the data as it moves through the application stack. Fine-grained data protection techniques such as field-level encryption allow for the protection of sensitive data fields in larger application payloads while leaving non-sensitive fields in plaintext. This approach lets an application perform business functions on non-sensitive fields without the overhead of encryption, and allows fine-grained control over what fields can be accessed by what parts of the application. Read m ore here…
Cybersecurity Breaking News – Top Stories
- NSO Confirms Pegasus Spyware Used by at least 5 European Countriesby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 27, 2022 at 6:14 am
The beleaguered Israeli surveillanceware vendor NSO Group this week admitted to the European Union lawmakers that its Pegasus tool was used by at least five countries in the region. "We're trying to do the right thing and that's more than other companies working in the industry," Chaim Gelfand, the company's general counsel and chief compliance officer, said, according to a report from Politico.
- Multiple Backdoored Python Libraries Caught Stealing AWS Secrets and Keysby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 27, 2022 at 5:58 am
Researchers have discovered a number of malicious Python packages in the official third-party software repository that are engineered to exfiltrate AWS credentials and environment variables to a publicly exposed endpoint. The list of packages includes loglib-modules, pyg-modules, pygrata, pygrata-utils, and hkg-sol-utils, according to Sonatype security researcher Ax Sharma. The packages and as
- Google Says ISPs Helped Attackers Infect Targeted Smartphones with Hermit Spywareby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 27, 2022 at 5:57 am
A week after it emerged that a sophisticated mobile spyware dubbed Hermit was used by the government of Kazakhstan within its borders, Google said it has notified Android users of infected devices. Additionally, necessary changes have been implemented in Google Play Protect — Android's built-in malware defense service — to protect all users, Benoit Sevens and Clement Lecigne of Google Threat
- Hackers Exploit Mitel VoIP Zero-Day in Likely Ransomware Attackby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 27, 2022 at 5:55 am
A suspected ransomware intrusion attempt against an unnamed target leveraged a Mitel VoIP appliance as an entry point to achieve remote code execution and gain initial access to the environment. The findings come from cybersecurity firm CrowdStrike, which traced the source of the attack to a Linux-based Mitel VoIP device sitting on the network perimeter, while also identifying a previously
- Learn NIST Inside Out With 21 Hours of Training @ 86% OFFby noreply@blogger.com (The Hacker News) (The Hacker News) on June 25, 2022 at 10:30 am
In cybersecurity, many of the best jobs involve working on government projects. To get a security clearance, you need to prove that you meet NIST standards. Cybersecurity firms are particularly interested in people who understand the RMF, or Risk Management Framework — a U.S. government guideline for taking care of data. The NIST Cybersecurity & Risk Management Frameworks Course helps you
- New 'Quantum' Builder Lets Attackers Easily Create Malicious Windows Shortcutsby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 25, 2022 at 4:05 am
A new malware tool that enables cybercriminal actors to build malicious Windows shortcut (.LNK) files has been spotted for sale on cybercrime forums. Dubbed Quantum Lnk Builder, the software makes it possible to spoof any extension and choose from over 300 icons, not to mention support UAC and Windows SmartScreen bypass as well as "multiple payloads per .LNK" file. Also offered are capabilities
- State-Backed Hackers Using Ransomware as a Decoy for Cyber Espionage Attacksby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 25, 2022 at 4:04 am
A China-based advanced persistent threat (APT) group is possibly deploying short-lived ransomware families as a decoy to cover up the true operational and tactical objectives behind its campaigns. The activity cluster, attributed to a hacking group dubbed Bronze Starlight by Secureworks, involves the deployment of post-intrusion ransomware such as LockFile, Atom Silo, Rook, Night Sky, Pandora,
- Apple and Android phones hacked by Italian spyware, Google saysby /u/wewewawa (cybersecurity) on June 24, 2022 at 11:47 pm
submitted by /u/wewewawa [link] [comments]
- SMTP for Phishing service?by /u/Ricardoh2 (cybersecurity) on June 24, 2022 at 9:44 pm
Hello community, I tell you that I lead ethical phishing projects and I have come across many email sending service stopers (SMTP open realy), do you know any that have served them for mass mailing and that "allow" ethical phishing exercises? submitted by /u/Ricardoh2 [link] [comments]
- I’ve managed to get a cyber job!by /u/Untraveled (cybersecurity) on June 24, 2022 at 8:13 pm
I first managed to get into an IT role around this time last year. Coming from a banking background and an accounting degree it was a bit of an uphill battle. After a couple of years of working in banking, I realised I have a passion for IT and security specifically. As I work for a massive outsourcing company, there are tons of opportunities with different career paths which allowed me to secure my first role as a service desk analyst. The role was easy enough and not too technical so I was using my free time to upskill using things like TryHackMe and YouTube. Even then, I didn’t feel like I was at a level to get into a cybersec role, regardless, I applied for a role in the SOC that my outsourcing company works for. Did a few interviews and as expected, I got rejected. I was given a training plan and was told to reapply in 6 months to a year. This was a month ago. Yesterday, I was surprised to see the head of security send me a message to have a chat today. I tempered my expectations and assumed he was checking up on how my training was going. Turns out a role has become available and I was offered the job. I can’t wait to get started even though I was told the learning curve will be practically vertical. Definitely going to be a bit of imposter syndrome in the first couple of months. I just wanted to share this and celebrate this online before I reveal to my friends! submitted by /u/Untraveled [link] [comments]
- Binaries for REby /u/Owt2getcha (cybersecurity) on June 24, 2022 at 8:05 pm
Hello all! I am wondering if anyone knows a good resource for binaries with exploited software that I could reverse engineer and add to my summer projects? Turned out I really enjoyed doing this in school and would love to get more comfortable with it. Thank you! submitted by /u/Owt2getcha [link] [comments]
- Has anyone here used AWS for malware analysis?by /u/that-gostof-de-past (cybersecurity) on June 24, 2022 at 6:37 pm
Ive received a few phishing emails and id like to do some analysis. I don't want anything touching my home network. Has anyone used AWS for this ? submitted by /u/that-gostof-de-past [link] [comments]
- How do password managers fit within your security model?by /u/Graham-1Password (cybersecurity) on June 24, 2022 at 6:10 pm
Hey folks - I work for 1Password helping guide our product roadmap, and, even though I've browsed this sub for a while personally, I'm coming to you to get your thoughts on password managers and their place in your company's larger security model. I've got nothing to sell and have just noticed the quality of conversation in this sub, hence me wanting to see what you folks think. (Mods have approved this, so, thanks!) I work on making sure we're building the right things for our business customers, and reddit gives me that frank, honest feedback I find so useful in so many other things in my life... To that end: How much do you feel like using (or not) a password manager makes an actual difference in your company's overall security posture? For your larger IAM systems and policies, how do you try and secure access to apps/services that aren't SSO-enabled and still need a username/password? Or does SSO cover off enough of your services that you aren't too concerned with the others? Does it fall to you folks in CyberSec to create and manage policies for how other sensitive info is shared? For example, other stuff can be stored/shared in 1Password (Credit cards, developer secrets like SSH keys, ...) - would you consider this stuff part of access management, in a sense, to try and keep organized with how that stuff is securely accessed? Happy to get your thoughts (the good, the bad, and/or the ugly) about any of this stuff, and even your more general opinions on how useful password managers seem to you. We've been building this tool for 15+ years and have always tried to keep a close connection to our users, even as we've grown. I'm hoping we keep it that way, so here's to me asking all of you! submitted by /u/Graham-1Password [link] [comments]
- IDS needed / recommendations?by /u/thelizardking43 (cybersecurity) on June 24, 2022 at 4:27 pm
Are IDS's antiquated and instead Huntress, Crowsdtrike, or other threat hunting services sufficient / superior? Are there IDS's you'd recommend? submitted by /u/thelizardking43 [link] [comments]
- A daily updated summary of the most frequent types of security incidents being reported by CISA, CERT-FR, MA-CERT, ZeroDayInitiative and IBMCloud.by /u/karimhabush (cybersecurity) on June 24, 2022 at 4:16 pm
submitted by /u/karimhabush [link] [comments]
- Best RSS feeds for your Intelby /u/securethelogs (cybersecurity) on June 24, 2022 at 3:24 pm
Hey guys, I’m just wanting to know what’s your best RSS feeds in keeping up to date with the world of Security. Things like BleepingComputer or TheHackerNews. Just curious 🙂 submitted by /u/securethelogs [link] [comments]
- SMS phishing is way too easyby /u/speckz (cybersecurity) on June 24, 2022 at 3:10 pm
submitted by /u/speckz [link] [comments]
- $100 million worth of crypto has been stolen in another major hackby /u/jivatman (cybersecurity) on June 24, 2022 at 3:05 pm
submitted by /u/jivatman [link] [comments]
- What is the best method for users to securely submit malware samples?by /u/tsuto (cybersecurity) on June 24, 2022 at 2:38 pm
As the title says, I’m wondering if there are any industry standards or best practices for how to actually move malware samples, memory dumps, etc from place to place? The idea would not be an end user really but rather forensic analysts being able to transfer artifacts they’ve extracted to dedicated reverse engineering teams. Worth mentioning that the RE group would be a subcontractor and needs to have a system for submitting tickets as well as files in a secure way between organizations. Is there anything your company uses that you’d recommend? submitted by /u/tsuto [link] [comments]
- Top cybersecurity stories for the week of 06-20-22 to 06-24-22by /u/CISO_Series_Producer (cybersecurity) on June 24, 2022 at 2:10 pm
Top cybersecurity stories for the week of 06-20-22 to 06-24-22 Below are the top headlines we’ve been reporting this whole week on Cyber Security Headlines. If you’d like to hear and participate in a discussion about them, the CISO Series does a live 20-minute show every Friday at 12:30pm PT/3:30pm ET. Each week we welcome a different cyber practitioner to offer some color to the week's stories. Our guest this week is Marnie Wilking, CISO, Wayfair. If you want to get involved you can watch live and participate in the discussion on LinkedIn Live (register), or you can just subscribe to the Cyber Security Headlines podcast and get it into your feed. Here are some of the stories we'll be covering: US DoJ announces shut down of Russian RSOCKS Botnet An international police operation that involved law enforcement partners from Germany, the Netherlands, and the U.K. shut down the RSOCKS botnet which was composed of millions of compromised computers and other electronic devices around the world. This included industrial control systems, time clocks, routers, audio/video streaming devices, and smart garage door openers. It had also expanded into compromising additional types of devices, including Android devices and conventional computers. The operators behind the RSOCKS botnet offered their clients access to IP addresses assigned to the compromised devices to route internet traffic. (Security Affairs) Experts warn of a new eCh0raix ransomware campaign targeting QNAP NAS The ransomware, tracked as “QNAPCrypt” and “eCh0raix,” is written in the Go programming language and uses AES encryption to encrypt files. The malicious code appends .encrypt extension to filenames of encrypted files. It has been active since at least 2019, and we reported on the last wave of attacks back in December 2021, In May 2021, QNAP warned customers of threat actors that are targeting its NAS devices with eCh0raix ransomware attacks and exploiting a Roon Server zero-day vulnerability on devices using weak passwords. Experts are now reporting a surge in eCh0raix infections in industry forums. (Security Affairs) Chrome extensions can be used for fingerprinting There have long been ways to use browser information to fingerprint users. However a web developer who goes by ‘z0ccc’ released the site “Extension Fingerprint,” which can generate a tracking hash based on a browser’s installed Chrome extensions alone. Some extensions use a secret token that is required for external pages to view if it’s installed, but z0ccc found that comparing loading times for the protection extensions can reveal which ones are installed. Bleeping Computer found that installing 3 to 4 extensions brough the percentage of users with the same extensions to as low as 0.006%. The approach works for Chrome and Edge browsers, but not on Firefox, which use unique Firefox extension IDs for every browser instance. The developer claims that while every browser can’t be uniquely identified by extensions alone, it could be easily combined with other information to create a truly unique ID. (Bleeping Computer) Overconfidence in API security leaves orgs at high risk Radware’s 2022 State of API Security report reveals a sharp increase in API usage due to reliance on cloud infrastructure and other intersystem communications. While 92% of those surveyed believe they have adequate protection for their APIs, 62% admit a third or more of APIs are undocumented, leaving organizations vulnerable to cyber threats, such as database exposures, data breaches, and scraping attacks. Additionally, half of respondents indicated their existing tools provide only partial or minimal API protection highlighting that cyber security leaders may have a false sense of security when it comes to their APIs. Michelle McLean, Vice President at Salt Security, said the findings reinforce that API security is vastly under prioritized, and the time is now to turn the dial and incorporate adequate solutions as old tools are not enough. (Security Magazine) Daycare apps found insecure The Electronic Frontier Foundation looked into the security used by daycare apps, which are often required when enrolling children. It found that almost all apps lack any kind of 2FA, with one of the more popular Brightwheel claiming it was the “1st partner to offer this level of security.” It also found many apps had weak password policies, used undisclosed Facebook trackers, and had cleartext traffic enabled. The EFF wasn’t the first to highlight these issues, but found that many app makers lacked basic emails to send security issues to, and often were unresponsive. A previous Australian study found that just 14% of vendors responded to security issues with daycare apps. The EFF also points out that regulations like COPPA don’t apply to these applications. (EFF) DARPA finds blockchains aren’t all that decentralized A new report from the Defense Advanced Research Project looking into if blockchains are decentralized found some “unintended centralities” leading the authors to believe that many blockchains could eventually have power centralized with a few select individuals or groups. The paper found the cryptographic underpinning of blockchain “quite robust.” But it points out that three ISPs saw 60% of all Bitcoin traffic, opening the door to these providers having the ability to restrict certain transactions, letting it become a majority voice in consensus of what actually gets written to the blockchain. The report also points out that 21% of Bitcoin nodes run older versions of the Bitcoin client that are vulnerable to attacks. (Gizmodo) Cloud email threats soar 101% in a year Trend Micro announced this number as their observation of growth in email-borne cyber-threats that they blocked last year. They also note a 138% year-on-year increase in phishing emails, of which 40% were credential phishing attempts. They also blocked 3.3 million malicious files in cloud-based emails, including a 134% increase in known threats and a 221% increase in unknown malware. Another security company, Proofpoint warned in a new report of the continued dangers posed by social engineering, highlighting how many users don’t realize that threat actors may spend considerable time and effort building a rapport over email with their victims, especially if they’re trying to conduct a business email compromise (BEC) attack, it said. (Infosecurity) Microsoft's AI spots ransomware attacks before they get started Microsoft is focusing on disrupting the earliest stages of a ransomware attack with AI enhancements for Microsoft Defender for Endpoint. In what the company calls "early incrimination," they are developing machine learning (ML) algorithms to determine "malicious intent" in files, processes, user accounts, and devices. Microsoft engineers have developed three sets of AI-generated inputs that independently generate a risk score determining whether an entity is likely involved in an active ransomware attack: • Time-based and statistical analysis of security alerts at the organizational level • Graph-based aggregation of suspicious events across devices • Device-based monitoring to flag suspicious activities By correlating these datasets, Defender can detect patterns and connections that might have been missed otherwise. If a high enough confidence level is reached, it automatically blocks the files and entities involved in the ransomware. (ZDNet) submitted by /u/CISO_Series_Producer [link] [comments]
- Ferret: Automatically finding RFC compliance bugs in DNS nameserversby /u/speckz (cybersecurity) on June 24, 2022 at 12:52 pm
submitted by /u/speckz [link] [comments]
- State-Backed Hackers Using Ransomware as a Decoy for Cyber Espionage Attacksby /u/Cultural_Budget6627 (cybersecurity) on June 24, 2022 at 11:29 am
submitted by /u/Cultural_Budget6627 [link] [comments]
- Cybersecurity career path podcastby /u/gormami (cybersecurity) on June 24, 2022 at 10:53 am
Suzanne Gorman (no relation) and some friends did a great podcast talking about some of the different careers within the cybersecurity field. For a lot of the folks here that are asking about what to expect in the field, or thinking about it without a strong understanding of what the opportunities are, take a listen. It may help you understand that it is not a monolithic field, and there are many different types of opportunities for different types of thinkers and skill sets. https://lnkd.in/gnJd4dSH submitted by /u/gormami [link] [comments]
- NSO claims 'more than 5' EU states used its Pegasus spywareby /u/Illustrious_Yard_576 (cybersecurity) on June 24, 2022 at 10:00 am
submitted by /u/Illustrious_Yard_576 [link] [comments]
- Interview catch22by /u/Relative_Ad197 (cybersecurity) on June 24, 2022 at 7:39 am
Hello friend, managers and engineers, I have a dilemma. What would you do if you had a candidate you were interviewing show up to an interview for a security engineer position, and inform you that they found a vulnerability, showed you it and told you how to patch it! Would you hire them? Not hire them? Why or why not? What do you do in this situation? Insider threats are some of the biggest risks to companies. On the other hand they helped you fix something which was missed. submitted by /u/Relative_Ad197 [link] [comments]
- Log4Shell Still Being Exploited to Hack VMWare Servers to Exfiltrate Sensitive Databy noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 24, 2022 at 7:37 am
The U.S. Cybersecurity and Infrastructure Security Agency (CISA), along with the Coast Guard Cyber Command (CGCYBER), on Thursday released a joint advisory warning of continued attempts on the part of threat actors to exploit the Log4Shell flaw in VMware Horizon servers to breach target networks. "Since December 2021, multiple threat actor groups have exploited Log4Shell on unpatched,
- Log4Shell Still Being Exploited to Hack VMWare Servers to Exfiltrate Sensitive Databy /u/sanket-darji (cybersecurity) on June 24, 2022 at 6:31 am
submitted by /u/sanket-darji [link] [comments]
- Chinese Hackers Distributing SMS Bomber Tool with Malware Hidden Insideby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 24, 2022 at 3:09 am
A threat cluster with ties to a hacking group called Tropic Trooper has been spotted using a previously undocumented malware coded in Nim language to strike targets as part of a newly discovered campaign. The novel loader, dubbed Nimbda, is "bundled with a Chinese language greyware 'SMS Bomber' tool that is most likely illegally distributed in the Chinese-speaking web," Israeli cybersecurity
- Leaving military roleby /u/grillle (cybersecurity) on June 24, 2022 at 1:30 am
After leaving the service I find myself in a weird position where I have to sell my current military specific training and experience (not that much, and probably outdated) to a completely new market of employers. Any tips on how I can hit the ground running in this new world? Should I focus my energy on certifications like OSCP or CISSP, maybe get a degree in cyber security or the like? One last question, how do you find a skill tree to focus on out of the multitude of things. do you guys just gorge on certs and experience and flow into a path? Thanks if you read this far 🙂 submitted by /u/grillle [link] [comments]
- Daily Cyber Briefby /u/RandyMarsh_Lorde (cybersecurity) on June 24, 2022 at 12:58 am
submitted by /u/RandyMarsh_Lorde [link] [comments]
- What is it like to to be an Cybersecuirty engineer for a major defense contractor?by /u/Mr_Hexx (cybersecurity) on June 23, 2022 at 8:19 pm
I start my internship next week and wanted to know what I'm getting myself into (what it's like working for a defense contractor in cyber) and wanted some advice. From my understanding they have secure cloud platform and that'll be where most of my work comes from. I'll be most likely doing a lot of risk assessments since he mention that in the interview along with my experiences with STIGs and crypto key management . I interned at a manufacturing company for a year and a half prior to this as a mainframe systems admin. I picked up any work that was security related with my typical duties, setting up Splunk for the z/os environment and the z/os TPM for a hardware migration to name the big ones. What is the culture and work flow like? And pro's and con's? Tips for someone starting a cybersecurity engineer role? submitted by /u/Mr_Hexx [link] [comments]
- Asking workers for once: why is there a cybersecurity skills gap?by /u/ChelseaJumbo2022 (cybersecurity) on June 23, 2022 at 4:23 pm
I am doing a research project on this issue right now— looking at cybersecurity capacity building efforts in the US, UK, Australia, and Israel. Everyone agrees that there’s a skills gap. Very few propose scalable solutions or offer reasons that fully explain the issue. I’m dismayed that there are so many surveys asking employers what they need from workers but very little out there (that I’ve found) on what workers are experiencing re barriers to entry, retention, upskilling, etc. Please share your thoughts, experiences, and any resources you think I should look into. Thank you! EDIT: wow, thank you for all the replies! To assuage any doubt, I’m not planning on using comments as ‘research’. This is just me dicking around on Reddit. Apologies that that wasn’t said from the start. Thank you everyone who replied!! submitted by /u/ChelseaJumbo2022 [link] [comments]
- CISA warns over software flaws in industrial control systemsby /u/kugkug (cybersecurity) on June 23, 2022 at 4:08 pm
submitted by /u/kugkug [link] [comments]
- Entry level opportunityby /u/TheRealBuzz128 (cybersecurity) on June 23, 2022 at 2:32 pm
Right now I’m about to graduate and get my BS in IT from a legit school. I currently got a part job as an IT Help Specialist at a small corporation to get some work experience before I graduate. This corporation has a small IT team so I’m working next to the IT director and the systems administrator. They include me for everything, even all the meetings with programmers, vendors etc, I’m there sitting and listening and giving my views. I got my sec+ a few weeks ago and with the little knowledge I have I wrote a proposal to have a phishing server and some security awareness training done. To my surprise my boss called me in and tells me that they loved my idea and that should be my big project for the next quarter, and also I got an extra work station assigned to me just to do that. My boss also gave me 90 mins every day I work to train and learn about any subject related to cyber security and he is willing to pay for learning material. We have a meeting every week, and so far they have made some changes based on my advice such as encrypting emails, using bitlocker, and to setup a dns sinkhole. Why am I writing all this? Well after reading a very interesting post here on reddit, I feel like I might have found a place were I can start my entry level cybersecurity career? The pay is not good at the moment, and we are going to talk about a full time job once I graduate this December, but this has me thinking, maybe I should stay at my current job, where they allow me to gain cybersecurity experience and then after some time try to get that next level dream job? Instead of going for a better paid IT job right after graduation that might not let me develop my security skills. submitted by /u/TheRealBuzz128 [link] [comments]
- Manual vs. SSPM: Research on What Streamlines SaaS Security Detection & Remediationby noreply@blogger.com (The Hacker News) (The Hacker News) on June 23, 2022 at 11:07 am
When it comes to keeping SaaS stacks secure, IT and security teams need to be able to streamline the detection and remediation of misconfigurations in order to best protect their SaaS stack from threats. However, while companies adopt more and more apps, their increase in SaaS security tools and staff has lagged behind, as found in the 2022 SaaS Security Survey Report. The survey report,
- New ToddyCat Hacker Group on Experts' Radar After Targeting MS Exchange Serversby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 23, 2022 at 10:34 am
An advanced persistent threat (APT) actor codenamed ToddyCat has been linked to a string of attacks aimed at government and military entities in Europe and Asia since at least December 2020. The relatively new adversarial collective is said to have commenced its operations by targeting Microsoft Exchange servers in Taiwan and Vietnam using an unknown exploit to deploy the China Chopper web shell
- Critical PHP Vulnerability Exposes QNAP NAS Devices to Remote Attacksby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 23, 2022 at 6:36 am
QNAP, Taiwanese maker of network-attached storage (NAS) devices, on Wednesday said it's in the process of fixing a critical three-year-old PHP vulnerability that could be abused to achieve remote code execution. "A vulnerability has been reported to affect PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24, and 7.3.x below 7.3.11 with improper nginx config," the hardware vendor said in an
- Russian Hackers Exploiting Microsoft Follina Vulnerability Against Ukraineby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 23, 2022 at 6:19 am
The Computer Emergency Response Team of Ukraine (CERT-UA) has cautioned of a new set of spear-phishing attacks exploiting the "Follina" flaw in the Windows operating system to deploy password-stealing malware. Attributing the intrusions to a Russian nation-state group tracked as APT28 (aka Fancy Bear or Sofacy), the agency said the attacks commence with a lure document titled "Nuclear Terrorism
- Europol Busts Phishing Gang Responsible for Millions in Lossesby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 23, 2022 at 6:18 am
Europol on Tuesday announced the dismantling of an organized crime group that dabbled in phishing, fraud, scams, and money laundering activities. The cross-border operation, which involved law enforcement authorities from Belgium and the Netherlands, saw the arrests of nine individuals in the Dutch nation. The suspects are men between the ages of 25 and 36 from Amsterdam, Almere, Rotterdam, and
- Researchers Disclose 56 Vulnerabilities Impacting OT Devices from 10 Vendorsby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 23, 2022 at 6:18 am
Nearly five dozen security vulnerabilities have been disclosed in devices from 10 operational technology (OT) vendors due to what researchers call are "insecure-by-design practices." Collectively dubbed OT:ICEFALL by Forescout, the 56 issues span as many as 26 device models from Bently Nevada, Emerson, Honeywell, JTEKT, Motorola, Omron, Phoenix Contact, Siemens, and Yokogawa. "Exploiting these
- Researchers Uncover Ways to Break the Encryption of 'MEGA' Cloud Storage Serviceby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 22, 2022 at 3:05 pm
A new piece of research from academics at ETH Zurich has identified a number of critical security issues in the MEGA cloud storage service that could be leveraged to break the confidentiality and integrity of user data. In a paper titled "MEGA: Malleable Encryption Goes Awry," the researchers point out how MEGA's system does not protect its users against a malicious server, thereby enabling a
- Newly Discovered Magecart Infrastructure Reveals the Scale of Ongoing Campaignby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 22, 2022 at 10:08 am
A newly discovered Magecart skimming campaign has its roots in a previous attack activity going all the way back to November 2021. To that end, it has come to light that two malware domains identified as hosting credit card skimmer code — "scanalytic[.]org" and "js.staticounter[.]net" — are part of a broader infrastructure used to carry out the intrusions, Malwarebytes said in a Tuesday analysis
- RIG Exploit Kit Now Infects Victims' PCs With Dridex Instead of Raccoon Stealerby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 22, 2022 at 5:41 am
The operators behind the Rig Exploit Kit have swapped the Raccoon Stealer malware for the Dridex financial trojan as part of an ongoing campaign that commenced in January 2022. The switch in modus operandi, spotted by Romanian company Bitdefender, comes in the wake of Raccoon Stealer temporarily closing the project after one of its team members responsible for critical operations passed away in
- Former Amazon Employee Found Guilty in 2019 Capital One Data Breachby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 21, 2022 at 1:05 pm
A 36-year-old former Amazon employee was convicted of wire fraud and computer intrusions in the U.S. for her role in the theft of personal data of no fewer than 100 million people in the 2019 Capital One breach. Paige Thompson, who operated under the online alias "erratic" and worked for the tech giant till 2016, was found guilty of wire fraud, five counts of unauthorized access to a protected
- Mitigate Ransomware in a Remote-First Worldby noreply@blogger.com (The Hacker News) (The Hacker News) on June 21, 2022 at 11:34 am
Ransomware has been a thorn in the side of cybersecurity teams for years. With the move to remote and hybrid work, this insidious threat has become even more of a challenge for organizations everywhere. 2021 was a case study in ransomware due to the wide variety of attacks, significant financial and economic impact, and diverse ways that organizations responded. These attacks should be seen as a
- New NTLM Relay Attack Lets Attackers Take Control Over Windows Domainby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 21, 2022 at 9:05 am
A new kind of Windows NTLM relay attack dubbed DFSCoerce has been uncovered that leverages the Distributed File System (DFS): Namespace Management Protocol (MS-DFSNM) to seize control of a domain. "Spooler service disabled, RPC filters installed to prevent PetitPotam and File Server VSS Agent Service not installed but you still want to relay [Domain Controller authentication to [Active Directory
- Google Researchers Detail 5-Year-Old Apple Safari Vulnerability Exploited in the Wildby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 21, 2022 at 6:18 am
A security flaw in Apple Safari that was exploited in the wild earlier this year was originally fixed in 2013 and reintroduced in December 2016, according to a new report from Google Project Zero. The issue, tracked as CVE-2022-22620 (CVSS score: 8.8), concerns a case of a use-after-free vulnerability in the WebKit component that could be exploited by a piece of specially crafted web content to
- Do You Have Ransomware Insurance? Look at the Fine Printby noreply@blogger.com (The Hacker News) (The Hacker News) on June 20, 2022 at 1:34 pm
Insurance exists to protect the insured party against catastrophe, but the insurer needs protection so that its policies are not abused – and that's where the fine print comes in. However, in the case of ransomware insurance, the fine print is becoming contentious and arguably undermining the usefulness of ransomware insurance. In this article, we'll outline why, particularly given the current
- BRATA Android Malware Gains Advanced Mobile Threat Capabilitiesby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 20, 2022 at 6:18 am
The operators behind BRATA have once again added more capabilities to the Android mobile malware in an attempt to make their attacks against financial apps more stealthy. "In fact, the modus operandi now fits into an Advanced Persistent Threat (APT) activity pattern," Italian cybersecurity firm Cleafy said in a report last week. "This term is used to describe an attack campaign in which
- Over a Dozen Flaws Found in Siemens' Industrial Network Management Systemby noreply@blogger.com (Ravie Lakshmanan) (The Hacker News) on June 20, 2022 at 5:11 am
Cybersecurity researchers have disclosed details about 15 security flaws in Siemens SINEC network management system (NMS), some of which could be chained by an attacker to achieve remote code execution on affected systems. "The vulnerabilities, if exploited, pose a number of risks to Siemens devices on the network including denial-of-service attacks, credential leaks, and remote code execution