Please enable JavaScript.
Coggle requires JavaScript to display documents.
SSD - Coggle Diagram
SSD
Mobile App Secuirty
-
Smartphone
-
Connectivity
Wigfi, mobildata, bt, NFC
-
-
general issues
-
-
-
-
App stores don't strictly validate security of the published applications.(Android has less security checking, iOS has a better security check feature)
-
-
-
Android Google
-
-
-
Permission/Access control ex; camera permission, gallery permission, contact permission
-
But, for any other interactions user should provide permission at install time.
-
-
Development
Java, Executeable bundleed with manifest files and packaged to Android Package files(APK).
-
-
iOS
-
-
Storage
SQL flat file Database, Key Chains to store passwords, cookies
-
-
-
-
-
-
-
-
owasp 10
-
-
SOME of vulerabilities
- Security misconfiguration
Improper error handling will expose application technologies and server technologies, db technoloigies. ex: Apache 7 tomcat server error handling
never use default configurations (default ports, default, SSl certificated, default credentials)
-
-
-
-
Static code analysis
ex: veracode, sourceclear, spotbugs
-
-
-
-
-
-
-
-
-
OpenId Connect
JSON Web Token (JWT)
-
Content
-
payload
user information liek name, role, expiration
signature
encrypted and hashed
used to validate the recieved header and payload. First hash value(hash_received) of header and payload is generated. Then decrypt the signature using JWT secret key to get the original_hash value. If hash_recieved == original_hash , then JWT is valid.
generated in server side by encrypting hashed content ( header and payload ) using server JWT secret key
-
-
-
-
-
-
Used to authenticate single sign-on identity. All OpenID is supposed to do is allow an OpenID provider
to prove that you say you are.
Ex: Signing up to Canva.com without any password. Here a user can click Sign Up with Google, so that the user can login to Canva.com using Google Credentials.
-
API Security
-
-
-
Can be used for system integration (like ESB, data services)
-
-
-
flows
Authorization Code flow
ReponseType=code&scope=openid,other-scope
-
Hybrid flow
-
ReponseType=code%20<id_token or token>&scope=openid,other-scope
- Returns a Auth code and id_token
- The Auth code is used to get the the id_token and access_token. Then step 1 id_token is compared with step2 id_token for validation. If matching, then authentication is sucessfull/.
- Then access_token can be used to get the claims
-
Implicit flow
ReponseType=id_token&scope=openid,other-scope
-
-
-
-
Blockchain
-
-
Akamai caching
At Akamai, caching refers to objects retrieved from your origin server and stored at any number of edge servers. Edge servers can quickly deliver the cached objects to your API consumers. Caching decreases the load on your origin server and reduces latency in serving objects to the end client.
-
-
-
-
What ?
-
-
-
Public key infra is used to uniquely identify each other.(Private key, public key)
A consensus (සම්මුතිය) in the network is required to verify a new block before being added to the ledger.
-
blocks
may contain
Transactions (financial, asset transfer, etc)
-
-
-
Chain of Blocks
Each “confirmed” block references the previous one, forming a chain of
blocks.
Details of ‘unconfirmed’ transactions are distributed throughout the entire
distributed peer-to-peer network.
miners
these are computaino resouerce used for validating confirming unconfirmed blocks. ex: graphic cards, ASIC miners
once a miner confirmed a block, the current node's local chain will get appended by it, and also the rest of other peer nodes will also be updated.
PROOF of work
finding a number by hashing it until finding first 30 cahractes as 30 0s in the hashed string. When found, the proof of work is given for that number.
-
-
-
-
-
-
Threat modelling
A systematic & structured technique, used to identify the security objectives, threats & vulnerabilities of an application, to help make design and engineering decisions, and determine where to prioritize efforts in designing, developing and deploying secure applications
-
Why
-
failures in detecting the loopholes (e.g., access control) by test engineers
-
-
Without threat modeling, protecting yourself is like “shooting in the dark”
-
-
Assume you are vulnerable, prove you are not
-
Common Types of Threat
-
-
APP
SQL injection, XSS, Input tampering
-
-
-
Authorization
-
classification
-
administrative controls
written security policies or methods used to check the effectiveness of security using assessments or auditing.
-
-
-
-
OAuth
-
The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf.
-
-
Authorization code flow
- Client application redirects webpage to AUTH Server.
- User accepts the consent for requested scopes to be allowed for the client app. (another value called state is also sent for maintaing the state between the auth server)
- Auth server sends Authorization Response (Code) to the user.
- User provides the Authorization Response (Code) to the client app.
- Client app sends a Token request call to the Auth server.
- Auth server send back an access_token, refresh_token(Supported only in auth code and password grant types) to the client.
- Now client app can access allowed scopes using the access_token
IAM Patterns
-
Account association
Combining multiple OAuth Server for a single user account.
Ex: Login for same email,. using FB Login as well as Google Login.
-
-
Token introspection
-
Timestamp skew is used to allow some more time for accessToken expiration on the resource server. (time difference between resource server and auth server)
Token revocation
POST auth0_api/revoke
BODY token=<token>
HEADER Authorization: Basic base64(clientId:clientSecret)
:Client app request the Auth server to revoke an access token (and refresh_token) if there is a breach. Auth server will then invalidate the token ASAP.
-
-
Low Level Security
-
Webb application issues
-
-
-
ClickJacking
overlaying an attractive action web page over a legitamate web page. Acatual legitmate action is mostly a unsafe user unware action.
-
-
-
Low level issues
BufferOverflow
Ex: 1988MorrisWorm, Code Red Worm, SQL Slammer
-
A buffer overflow occurs when data written to an allocated buffer also corrupts data values in memory addresses adjacent to the destination buffer due to insufficient bounds checking.
-
-
-
-
types
Stackbuffer overflow
Can be slightly protected by adding -fno-stack-protector AND adding -mpreffered-stack-boundary=<val> when compiling the prg
-
-
-
Counter measures
Libsafe Project
re-implementing strcpy(), strcat(), gets()
-
-
Memory structure
-
Stack
Used to store local variables which are only used in a function. These variable are stored in a element called as frame.
Data
Readable and writable segments containing static, global, initialized data segments and variables
BSS
Readable and writable segments containing static, global
-
-
Registers (32 or 64 bit high speed storage location inCPU, designed for high-speed access). Registers can be grouped into the four categories.
Categories
-
Segment
Used as base locations for program instructions, data, and the stack
-
-
-
Web security
-
-
sql injection
-
injection types
-
union injection
eX: SELECT name, price from product where name like '%usb%' union select username, password from user where '1' like '1';
-
-
-
-
-