How can I determine if my system was infected? At the risk of being overly cautious (after a bout of recklessness, due to being groggy from lack of caffeine), I want to be certain that my system is not infected after running an infected file.

I'm on Linux and I'm almost certain the virus only affects Windows via MS Office. But I'm not a virus expert, so I would appreciate some pointers (after ClamAV not detecting anything).

Here's what a Virus Total online scanner found:

I researched some of the malware names, and it seems the main exploit is via Microsoft Office, inside a Windows machine. However, as I said, I foolishly opened the file in Libre Office and clicked "Edit file" in Linux Mint, which presumably would have activated the infection.

How can I be certain my computer is still safe? Should I format?

Unfortunately, we can't be 100% certain your computer is safe after opening a probably infected file. It seems that multiple security products flagged this .xlsx file as potential malware according to Virus Total report, I doubt this is a false-positive.

However, the risks might be mitigated since you are running on Linux and with Libre-office. The probabilities that the malware might have been made to run on Windows with Microsoft Office is higher.

In paranoid mode, if you want to be more than 95% certain than no malware is left on your computer, I would recommend you the following :

1) Backup all your files (except the malware-bundled .xlsx one) from a clean OS instance.
   - A Linux Live CD burned from a trusted computer would be the best

2) Completely wipe your computer hard disks, using a software such as DBAN.
   - If you want to go faster, I suggest you use dd from the Linux Live CD.
     dd if=/dev/zero of=[your hard disk] bs=4M count=256
     (writing 1 GB of zeros should be enough to clear the MBR/GPT of unwanted stuff, in case you got a tough malware)

3) Reinstall your OS, be sure your installation media comes from a trusted source.

4) Reinstall your program, again, be sure installer is from a trusted source.

5) Restore your data


Secure Flash with click to play plugins in the enterprise In the light of recent repeated critical Flash vulnerabilities there are recommendations to use browser plugins like click-to-play to prevent unnecessary Flash content from automatically loading with every Webpage.

I think this is a good idea however there is the matter of distribution and maintaining such plugins as well as selecting a well maintained and trusted one in the first place (for IE, Firefox, Chrome at least). I don't want to introduce another vulnerable surface into the environment.

So the question is:

Do you have experience using such Plugins in an enterprise environment with lots of Windows clients? (lets say 100+)
How do you deploy the plugin?
How do you maintain the plugin? (regular updates)
How do you centrally manage the configuration of this plugins? (GPOs?)

I'm interested in the enterprise feasibility and your experience with click-to-play'ish browser plugins in the enterprise.

This post by Google will help you set up extensions in Chrome via Group Policy and the master_preferences file - https://support.google.com/chrome/a/answer/188453?hl=en&ref_topic=2936229
Also, i'd recommend the following extensions (recommended by SANS):

Netcraft
NoScript
HTTPS Everywhere
Ghostery
Ublock Origin


Any concern for not locking or even closing the rack door inside private cage of DataCenter? Recently, a customer asks for not closing and not locking his rent rack inside a cage of data center, is there any reason to reject his request due to security reason?

Since the rack is inside private cage and in data center, if the rack is not inside cage, everyone knows this must be rejected as anyone can easily take away equipment from the unlocked rack. While this case is inside private cage, the cage is protected by access system.

Therefore, any reason to support not allowing customer request for this?
I don't want the rack door keep opening just feel that is not safe enough, but cannot provide a stronger reason to support this decide.

If you decide to allow this, make sure you cover your own ass. Make sure you have a written and signed statement from the customer about this arrangement. Make sure the statement states that you've advised them not to do so, and have explained to them what the risks are, and that the customer will take full responsibility of any losses incurred to them and/or to you due to the non standard procedure. Make sure the statement is signed by key decision makers on the customer's company, which should include the key technical personnels, security officers, and executives.

Ultimately, the customer's security and risks appetite is their own responsibility. If they are willing to put up with the risks against your advice, then that's on them. If the customer has their own security requirements, it's ultimately on them to make and break.

Also, if you yourself had your own compliance standards that you're subjected to. Ask them what they think about it. Make sure you won't get dragged into problems due to this.


Mongo DB hacked (read_me_to_recover) without the port exposed in the firewall? I have recently set up parse-server on a DO VPS using 3 docker containers; one for parse-server, one for parse-server dashboard and one for mongodb. Because I am just testing this setup I left the mongo container as it is:
mongodb://mongo:27017/dev.
I have NGINX (not in docker) running as a reverse proxy (to get SSL). It forwards port 80 and 443 to http://127.0.0.1:4040 internal (the parse dashboard web gui). and it routes 1338 to http://127.0.0.1:1337 the parse server (API) itself. This parse server connects to my mongo DB internally.
This is the first time I am using Docker and MongoDB.
Because of this setup and the mongo db port not open I thought it would be half-decently safe.
How did the hacker breach my database? There was nothing of value stored but there might be in the future. I don't think he exploited my parse server because I could see the connection coming from a cpython client (the parse connection showed as nodeJS client.
I have added: NGINX, FIREWALL,Docker processes,  Mongo LOG lines
nginx
terminal
{"t":{"$date":"2020-08-13T12:23:14.165+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"connection accepted","attr":{"remote":"46.182.106.190:39672","sessionId":31,"connectionCount":3}}
{"t":{"$date":"2020-08-13T12:23:14.359+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn31","msg":"client metadata","attr":{"remote":"46.182.106.190:39672","client":"conn31","doc":{"driver":{"name":"PyMong                      o","version":"3.10.1"},"os":{"type":"Linux","name":"Linux","architecture":"x86_64","version":"4.15.0-112-generic"},"platform":"CPython 3.6.9.final.0"}}}
{"t":{"$date":"2020-08-13T12:23:15.941+00:00"},"s":"I",  "c":"COMMAND",  "id":20337,   "ctx":"conn31","msg":"dropDatabase - starting","attr":{"db":"READ_ME_TO_RECOVER_YOUR_DATA"}}

> db.README.find();
{ "_id" : ObjectId("5f3536cd2a546e2eea8211eb"), "content" : "All your data is a backed up. You must pay 0.015 BTC to 145Nny3Gi6nWVBz45Gv9SqxFaj                                                                                uwTb2qTw 48 hours for recover it. After 48 hours expiration we will leaked and exposed all your data. In case of refusal to pay, we will contac                                                                                t the General Data Protection Regulation, GDPR and notify them that you store user data in an open form and is not safe. Under the rules of the                                                                                law, you face a heavy fine or arrest and your base dump will be dropped from our server! You can buy bitcoin here, does not take much time to                                                                                buy https://localbitcoins.com with this guide https://localbitcoins.com/guides/how-to-buy-bitcoins After paying write to me in the mail with yo                                                                                ur DB IP: restore_base@tuta.io" }

Exposing a port through Docker bypasses ufw because Docker directly creates an iptables rule.  So your firewall is useless.
You do not actually need to expose the container port to the host, however, in order to enable other containers to access it.  I recommend simply not exposing your ports  except if they need to be accessed externally.


Can an attacker add malicious instructions to a cracked Password Manager app to exfiltrate credentials ? (1Password, oneSafe, etc.) (In OSX) Would it be possible for an attacker to add into a password manager app (cracked illegal version, downloaded from a pirate website), instructions to make the program send credentials over the network?

1) When a cracker crack an app (OSX context), he breaks the code-sign certificate (even if he does not attach any malicious software to it, and just crack it), so basically when trying to install, the user would still be prompted for "Are you sure you want to open? it comes from an unknown developer" message. —› There is no way for the user (during the installation process) to detect something like that, right? Of course later it can be detected on a network level with something like LittleSnitch.

2) Also, how can be accomplished something like that? Is it enough to just add the required assembly instructions with IDA Pro for example? Does program like that has security systems that prevent Control Flow to be altered? If yes, can those be circumvented?

3) Is there any precedent in the Infosec history? Even if not applied to password manager software, has ever happened that a cracked app carried malicious code for "itself"? Of course it is well known that cracked apps (especially on Windows) carry viruses, but is there any precedent of a crafted app that does something bad related to its intended use (f.i. sending password stored by itself)?

P.S. By password manager app I'm referring to the desktop versions of like 1Password or OneSafe, etc. (server side app, or browser extensions is something different i think)

Thanks as always

Yes, of course this is possible.

The detection difficulty depends heavily on the implementation (more to that later)

How this can be achieved. Example: By simply changing the API endpoints to a server that you control and putting NOPs on the instructions that do the actual encryption (hopefully there is some).

The difficulty relies heavily on the target app. Obfuscation for example makes the process painfully slow. But the scenario includes an attacker that has the skill to bypass some security mechanisms and the most well-thought ones - the crack detection.

About the detection, if you just skip 2-3 instructions (enc/decryption) it’s REALLY hard to detect it. Suspiciousness is mostly raised by network connected things, so a weird domain, would some day, hopefully hit an eye. Maybe.

But if for example you buy 1.password.com or 1-password.com and do no command and control stuff and you just leak passwords over secure SSL, I’d bet that you would have some fun for a couple of years

Unfortunately I have no information on such precedent.


Access Control Lists - Why block a port rather than block a protocol? I am studying for my Security + exam. I have just learned that ACLs can be designed to block ports and/or entire protocols. The book I am reading states an example:

"if you want to block HTTP traffic, you can create a rule to block traffic on port 80"

This makes sense - HTTP is usually sent over port 80. But why block it this way instead of just blocking the HTTP protocol by its protocol number?

I'm sure I'm missing some information because I can't find a protocol number for HTTP.

What are the advantages of blocking a port rather than blocking a protocol number? What are the advantages of blocking a protocol rather than blocking a port number?

Thank you!

Blocking a port is cheap: it can be done by a simple stateless firewall only inspecting up to OSI layer 4. It can also be done with the first packet already, i.e. even at the TCP handshake were no data are transferred yet.

Blocking by the actually spoken application protocol needs to analyze the payload (layer 7). This means that first it needs to collect sufficient payload for analysis, which means it cannot be blocked already at the TCP handshake. Then it needs to have some reliable heuristics to find out based on the first few bytes which kind of protocol this is. There are several protocols where the server sends data first (i.e. SMTP, IMAP, FTP...) in which case the firewall has no choice than to allow a connection to the server in order to get the first data in order to analyze the protocol. Allowing the connection initially already can have some unwanted side effects.

And even with payload it is not always clear which protocol this actually is. There are several protocols which use TLS (i.e. HTTPS, POP3S, IMAPS, ...) and it is often not possible to decide based on the initial TLS ClientHello what kind of protocol will be spoken inside the TLS connection.

To summarize: The best would be to block by port as long as this is reliable since this is cheap and can be done early. Additionally one can analyze the application layer for the ports which are not blocked if the actually spoken protocol is the allowed one.

  But why block it this way instead of just blocking the HTTP protocol by its protocol number?

There is no protocol number for HTTP. And "protocol" actually has multiple meanings: there is the "application protocol" at layer 5..7, i.e. HTTP, SMTP, ... . And there is the "transport protocol" at layer 4, i.e. UDP, TCP, ... These transport protocols actually have numbers used in the IP header, i.e. 17 for UDP, 6 for TCP etc. But blocking based on transport protocol makes not much sense since blocking any kind of TCP or UDP will simply block too much.


Removing null bytes from shell code I am learning the basics of shell coding so that I can learn to exploit buffer overflows. The problem is, the example byte code that I wrote contains null bytes. Here is the example:

xor    %edi,%edi      >       31 ff
mov    $0x3c,%eax     >       b8 3c 00 00 00
syscall               >       0f 05

Bytecode : "\x31\xff\xb8\x3c\x00\x00\x00\x0f\x05"

What are some common techniques used to eliminate null bytes? I heard that people use encoders for this sort of thing but I cannot find any great resources on this.

mov can be replaced by push and pop. So eg this:

mov    $0x3c,%eax

Can become this:

push $0x3c
pop %eax

Which would give you this null byte free code:

   0:   31 ff                   xor    %edi,%edi
   2:   6a 3c                   push   $0x3c
   4:   58                      pop    %eax
   5:   0f 05                   syscall


custom input format for hashcat I am doing a password strength audit (I have permission). I'm using Hashcat.  It supports formats like sha-256(password.salt) and sha-256(salt.password) but my hashes are generated by sha-256(username+"|"+password+"|"+salt).

So, ideally:

I would provide a file in the format username,salt,hash
hashcat would concatenate username, [password guess], salt,
hashcat would hash that string and compare it to the hash.

Is there a tool in hashcat that helps me define how the parts of the hash are concatenated, to add to the algorithm options provided?

Hashcat supports rules for modifying word lists on the fly.

You can prepend the username and append the salt in a rule file (save as something.rule):

^username $salt

and use -r in Hashcat to call the rule file.


AWS KMS same key for every request I've been trying to use KMS to store sensitive personal data. We generated a CMK and are using the API/Encrypt over https. The idea was to store login information (emails) using KMS, we are using a password less authentication (JWT). This email data could potentially be decoded if some feature requires it but that's not the issue here.

I know that encrypting the same input using envelope encryption will give me a different result every time thus why encrypted keys need to be stored alongside the encrypted result, but i want to do one way-comparison to enable secure logins.

I need KMS to use the same key (therefore not envelope encryption right?) for every encrypt call so i can compare encrypted results. Is this something that can be done using KMS? Do i need to manually generate a key and securely store it in CMK to allow this or can i use a KMS-generated key? I've read all the KMS documentations but it's still a bit fuzzy and i can't find a decent source clearly explaining all this. My PoC clearly returns a different result every time.

I sincerely hope i'm asking the question in the right place, i dont think it's well suited for SO. Thanks!

KMS uses envelope encryption. The encryption key changes each time you make a request for a key.

If you need a key that doesn't vary you'll need to manage your own encryption.


What is an offsite facility as per PCI DSS requirement 9.5.1? PCI DSS Version 3.0, Requirement 9.5.1 says that we have to store media backups in a secure location, preferably an off-site facility such as an alternative or backup site or a commercial storage facility.

I don't understand this requirement. What is an offsite facility for data protection?

How do you store the media backups using an offsite facility?

When I searched for offsite facility for media backups, I saw offsite data protection in the below link.
Offsite Data Protection but I still don't understand what this means.

This requirement appears to relate to backup media (e.g. tapes/disks etc) which you may have as part of your backup regime.

The idea here is that you shouldn't store backup media on the same site as the systems they are backing up as in the event of an outage at the main site, you may not have access to the backups either (which makes them less useful to you).

So if you store them at another physical location, they will still be available to you in the event of a disaster at the main site.

In terms of complying with the requirement, you may well find that a disaster recovery company or backup company (in the UK Iron Mountain is a good example) will provide a service where they will securely store backup tapes for you.

An alternative, if you have multiple physical locations, is to store tapes at other sites you own.  However this does add some additional complications as you'll need to make sure that you transport and store the tapes securely, to avoid the risk of losing them.

All this assumes that you're backing up to removable media. If you're doing online backups (e.g backup to the cloud) none of this is relevant as you don't have backup media to manage!


Can a school wifi track your wifi after you disconnect? So I logged into my school wifi on my laptop, and I was just wondering:

Can they still track what I do even after I disconnect? I am using my own computer (not the school's,) but is it possible that they can somehow track/monitor my activity on said computer even after I go home and use my home internet?

...or is that considered spying and illegal?

Your Laptop, Your Network

No, they cannot see what you're doing on your laptop when you're on your network, because you're using your machine and accessing the internet through an ISP that's not theirs. You're right to suspect that monitoring you in this situation would be illegal.

Their Network

When you're on their network, however, the game changes. They can monitor your internet traffic. If you're browsing by way of HTTPS, they can see what domains you visit, https://www.website.com for example, but not that you ventured to https://www.website.com/questions. In this case, the /questions element would remain hidden. Assume that your activity is being monitored while you're on their network, even when you're using your own computer.

Their Machines

I know this is beyond the purview of your question, but note that they can monitor far more when you're using one of their computers. They can, for instance, install a keylogger, have a program take snapshots of the screen at random times, etc. For this case, I invite you to explore the following thread for additional information: Can my employer see what I do on the internet when I am connected to the company network?


What is the impact of an exposed secret key for a JWT token implementation? I am currently using JWT implementation for the authentication part of my APIs.
A private key is used to sign the token generated and used to make sure it's not tampered with when it's used later for other API.
My question is - What is the impact if this private key is leaked? What can the bad guy do with it?
From here, my understanding is that the payload can be altered. Hence, in that example, a normal user can be changed to admin. But in my scenario, I don't have any other important fields except expiration date.

So other than the bad guy able to forever extend his own token expiry date, what are the other impacts that I am facing?

Whoever possesses the private key can create valid tokens where your system simply can not distinguish between a legitimate token and a token created by the attacker.
I am guessing you are not just using the expiry field but also the subject field sub, which is in short terms the logged in user.
With the private key, I can create a token with any subject I want, thus sign in as any user of your system.
As you stated, I can also add any other claim and you system has no choice but trust it, as I was able to create a valid signature.
It can not be stressed enough, but JWT heavily relies on the private key to stay absolutely private. Losing the private key is the worst case scenario.


what's the absolute worst damage javascript could do to a client? Assuming I have a defenseless client computer running Windows 7 that will happily allow any javascript code it comes across on the internet, what's the worst damage that could be inflicted?

I'm unclear on javascript's "reach". Could it erase files on the hard disk? Could it change user access permissions? What horrible fate is NoScript saving me from on a daily basis?

The intended reach of Javascript is limited so it can not access the desktop nor any files in your computer.  The security of your computer is limited to how up-to-date the browser is (patching etc), and the associated Plugins.

On the other side, "bad guys" try to find holes in technology and use that knowledge to gain access to something they otherwise wouldn't.  When this happens, and the vendor is aware of it, a patch is released.

A few bad things Javascript can do:

Javascript alone might allow all the information of a poorly written website to be sent to a "bad guy".  This is called XSS / CRSF.
It can also cause your logged in account to make changes to websites (editing financial data of a different unrelated site) without you knowing.
Finally in regards to your local computer, the exposure depends what add-ins are installed (Flash, etc).  If the client has an old version of flash installed, then your whole PC can have malicious software installed on it, or have security dialogs altered to confuse even an educated/informed user.


Simple-to-implement ad-hoc password validation scheme I'm writing a level for a game in which the player has an advantage if they know a password.  I want it to be infeasible to find the password from looking at the level's source code.

The problem is that the language's levels are written in an ad-hoc scripting language without any crypto libraries, so I have to implement everything myself.

Also, inputting passwords within the game is a little awkward, so I'd like the password to be no larger than a random 64-bit integer, which should provide enough entropy to avoid a brute-force attack.

One possibility I've considered is to store a large semiprime and have the password be one of its factors.  Validation is very easy to implement, but semiprimes need to have factors much larger than 64 bits to be secure.  I've considered storing the first 448 bits of a 512-bit factor and have the password be the remaining 64 bits, but I have no idea if this is secure.

Another possibility is to implement SHA-256 and store the password's hash.  This would of course be much harder to implement.

So my questions are:

If a 1024-bit semiprime is stored along with the first 448 bits of one of its factors, can the remaining 64 bits of that factor be feasibly found?
Is there another easy-to-implement but hard-to-crack password validation scheme I could use?

The problem with the method that you have suggested is that it is basically a partial-key exposure of RSA. You are exposing some bits of a factor of a semiprime. Dan Boneh's survey on RSA attacks lists a theorem from Coppersmith that states that if the n/4 least significant or most significant bits of a factor of N are known, then N can be factored efficiently. Since you want to leak way more than n/4, I think your method would be susceptible to that attack.

The good news is, Boneh gives some insight into something that might work:

  It is interesting that discrete log-based cryptosystems, such as the ElGamal public key system, do not seem susceptible to partial key exposure. Indeed, if g^x mod p and a constant fraction of the bits of x are given, there is no known polynomial-time algorithm to compute the rest of x.

So, you could pick some random x, a large prime (1024 bits) p, and a generator g (in practice I'd use some standard NIST values for P and g). Compute g^x mod p, store that in your software. Store some number of bits of x in your program. The user must supply the remaining bits of x. Call their bits plus the stored bits x'. You compute g^x' mod p and see if that matches with what you had stored.

I believe that the statement from Boneh has not changed since it was published. That maybe something you want to ask on Crypto.SE, along with recommendations of how many bits should be left out of the source code.


Does 2-Factor Authentication protect against malware? My question has to do with whether 2-Factor Authentication protects against a compromised system (malware). There are a couple of scenarios in which I wonder whether it does:

Every time you login to a web-service (let's say: e-mail) you enter
your password and generated one-time password every single time.
You only login once on a web-service and tick a "Remember me"
checkbox (causing you to not have to authenticate for a month or
even longer).
You login in an application (let's say Steam) and you enter your
password and generated one-time password every single time.
You only login once in a application (let's say Steam) and tick a
"Remember this device" checkbox (causing you to not have to
authenticate for a month or even longer).

Does 2FA protect against malware in none/any/all of these situations? As you may be able to decipher from my questions, I am especially wondering whether:

Can browsers build a safe "Remember this device" feature or does the
web simply now allow for it?
If browsers can't implement a safe "Remember this device" feature,
are application also not able to (application do have more access to
unique system information)?
Should I never tick any "Remember me/this device" checkboxes because
they're insecure, and does this mean that I have to login using a
OTP every single time?

2FA done properly helps protects your authentication to a system by making the login credential time limited. If you use a normal username/password and I obtain it, I can do bad things, as you, whenever I like. With 2FA I have maybe a minute or two to carry out my dastardly plans.

If you (or the service you're connecting to) has malware installed then you still have an issue. Part of your credentials may be obtained and combined with other weaknesses to do BadThings later, or it could be possible to establish a bridgehead on the target system to later exploit. Or maybe even go ahead and do something evil right there and then.

Saved credentials in the browser, remember me tick-boxes etc are by nature a reduction in security in return for greater convenience. If it's your login on your machine which nobody else uses and your anti-virus, patches etc are up to date then it's probably minimal risk. Also depends what the service is too - commenting on Stacks, El Reg  etc is very different to treasury operations for a Global100 corporation.


When do governments allow export of cryptography software? I see this notice in the TextSecure README:

The U.S. Government Department of Commerce, Bureau of
Industry and Security (BIS), has classified this software
as Export Commodity Control Number (ECCN) 5D002.C.1,
which includes information security software using or
performing cryptographic functions with asymmetric
algorithms. The form and manner of this distribution
makes it eligible for export under the License Exception
ENC Technology Software Unrestricted (TSU) exception (see
the BIS Export Administration Regulations, Section
740.13) for both object code and source code.

Why does the US Govt feel this software is "eligible for export"?
Does that mean it has a circumvention available?

TextSecure is just an example. More generally, on what basis do govts allow export of encryption software? If a govt allows some cryptography software to be exported, does it imply that it is not stong enough?

From this Apache link, ECCN 5D002 can be summarized as:

Software specially designed or modified for the development,
production or use of any of the other software of this list, or
software designed to certify other software on this list; or
Software using a "symmetric algorithm" employing a key length in
excess of 56-bits; or
Software using an "asymmetric algorithm" where the security of the
algorithm is based on: factorization of integers in excess of 512
bits (e.g., RSA), computation of discrete logarithms in a
multiplicative group of a finite field of size greater than 512 bits
(e.g., Diffie-Hellman over Z/pZ), or other discrete logarithms in a
group in excess of 112 bits (e.g., Diffie-Hellman over an elliptic
curve).
Software designed or modified to perform cryptanalytic functions If
the cryptographic functionality is limited to one of the above
definitions, it should be classified as ECCN 5D002, and the remaining
two steps should be taken (described below). If the release may
contain cryptographic functionality beyond what is described above,
please contact the ASF Vice President for Legal Affairs.

In a nuttshell, it appears to mean that if it is software that encrypts with keys above a certain strength, it gets classified as cryptographic software. But I don't speak lawyer, so~


what are potential security risks of a python script outside public_html folder I would like to know the risks of a python script that is outside of public_html

application/scripts/myscript.py
public_html

This script is called by the php application asynchronously. it receives an argument that determines which file folder will be deleted after x minutes and after update the mysql database

The folder that contains this script has 700 permisions and the owner is www-data.
myscript.py has 700 permisions too

Can someone execute this script remotely? or maybe pass some python instruction?
How could I prevent from potential risks?

I'm newbie, and I would like to learn.

Whether they can access it remotely depends on many things, such as your server's configuration details, and any security holes in your CGI scripts.  The python script does not create any security risks merely by existing (if a remote user could execute it, they could use the same techniques to execute something like cat /etc/passwd or rm -rf /), but may present risks if a remote user can influence its operation.

You haven't provided enough information to give a definite "yes" or "no" to any of your questions, and for some of them, it requires a detailed analysis of the computer's configuration.


Block outgoing network traffic from "Smart" TV The FTC has just settled a case with Vizio, saying that the company has been quietly capturing pixels from their smart TVs, matching those pixels to databases of content, and selling that information (and corresponding IP addresses) to advertisers.  It appears to be possible to turn off this "feature", but I'm still not really confident that my information isn't leaking out and being used in ways that I don't want.

I want my TV to communicate with other devices on my network.  For example, I like to use Chromecast to cast from my laptop to the TV.  But I suspect that the TV doesn't need to directly communicate with anything off my network (except for the occasional system update, which I don't mind opening up for).  Would it be effective, and generally reasonable, to simply set my firewall to block outgoing requests from the TV's MAC address, for example?  Should I generally be doing this (or something like it) with other devices that I need on my network but don't want communicating with the outside world, like my TV's tablet remote?  Are there any other steps that I should take to ensure I'm not broadcasting personal data in such obvious ways?

If you can set your firewall to block a particular MAC from exiting your network, yes, that would be the best strategy.  However, ordinary consumer grade routers may not have the capability.

Instead, what you may need to do is discover the external address (or addresses) that the TV is attempting to connect to, and find a way to block data from reaching their servers.  One way is to add a static routing entry for that destination's IP address and route it to 0.0.0.0 to ensure the connection attempt doesn't leave your premises.


Will sabotaging a shared web hosting account threaten the security of sibling accounts being that they are shared on the same server? Will sabotaging a shared web hosting account threaten the security of sibling accounts being that they are shared on the same server?

Whether it it be through htaccess setups, posting login credentials and configuration specifics publicly, or the like, what are the main vulnerabilities a client on shared hosting can face from malicious sibling accounts? Or by their complete noob mistakes.

It depends on the degree of isolation between accounts. Simplifying what would otherwise be a quite broad topic:

No isolation worth the name

The webserver runs as, say, wwwrun:wwwdata, all the websites are group readwritable, accounts are ftp-chrooted into their own webroots. A malicious script on site A is then running as group wwwdata, and may read and write files on other webroots. You could say that such accounts are born compromised.

Still, some small firms that maintain websites for customers (complete outsourcing) might choose to operate this way, since "we're the only ones to access the server". Poor maintenance, disgruntled employees and installation of vulnerable third-party frameworks, usually not in this order, are the main risks. I.e. if customer A wants to not upgrade a heavily firm-customised version of MyNiceBlog 1.0 to security-fixed 1.5 because porting the customizations would be expensive, he's actually endangering all the other sites on the same machine.

Minimum isolation

The webserver runs as above but there are limitations ("safe modes") that try preventing a script from exiting its web jail. The problem is that the process is voluntarily refraining from using some of the rights and powers that it still has. So you need also to remove some functions and features (e.g. executing a shell script) which could lead a malicious script to being able to use again those powers. The site is only marginally more secure, and loses several features and performances in the bargain.

Reasonable isolation

The webserver runs with full permissions, then for each request it receives, it spawns a copy of itself with reduced permissions. Each webroot is then also owned by a specific user with a group of his own, and there is no cross-read access. The user is chrooted into the web site.
If everything works as it should, this setup is reasonably secure -- so you must be wary of privilege escalation exploits that might make thing work as they shouldn't. Depending on the platform and software installed, the attack surface may be quite large. Some functions (e.g. loading dynamic modules) might still require blocking.

Also, the processes are not isolated at the network level; so for example any request from site A would be seen from site B as coming from the same host, which can be bad for (say) database servers. If site A has a GRANT ALL PRIVILEGES ON mydb.* TO root@localhost, site B may connect to that database on the same "localhost" with full access and A none the wiser.

Strong isolation

Each webserver instance runs in what amounts to a virtual machine of its own, with independent networking. The sites can't see each other and, if they do, they do so with external IP addresses, so DB server A can't mistake a login request from site B for a request from inside itself. Still, resource contention might be an issue, and connections to the outside might be NATted so that they are indistinguishable. Site A might then send emails pretending to be site B, for example, or it could try and reclaim all available memory, bandwidth or disk I/O slots to negatively affect site A. Some low-level functions might be shared between machines and can be used to mount attacks, e.g. clock and randomness-source reading to defeat authentication schemes.


How to authenticate a legit thing App on the Internet of Things? I want to develop a server for a sensor on the Internet of things (IoT). Everybody can buy the App for that specific sensor. The App will exchange data with the server. How can the server validate that data is really stemming from a legitimate App?

Since everybody can buy the App and a compatible sensor, 'everybody' can also disassemble/hack and copy the authentication into a non-legit app, also if the server would provide a one time license code, or a pre-shared key, or a certificate.

Looking at DTLS-based Security with two-way Authentication for IoT, it seems that a trusted platform module (TPM) is the way to go. But that would not be a viable solution for an App in an App store, wouldn't it?

Is there any other way for the server to validate that a message is really from a legitimate App? Perhaps a way that is not as strong as a TPM, but still acceptable depending on the value of the data to protect?

Software is inherently copyable, as all those who have tried to prevent copies of their software from getting out have found.  Crackers have more time to spend than you do, and they only have to find one exploit.

If you're talking about app stores, then you've got five major choices:

Trust your users, and keep your software simple and robust.

I recommend this one.

Choose app stores whose validation mechanisms you trust to be "good enough", and use those.

Second best

Sell a piece of hardware that's an authenticator (a dongle) and then give the app away for free, since without the dongle/authenticator it's worthless.

For instance, a Yubico FIDO, or try to find a Bluetooth smart card reader.
Or use one already available, like the TPM you mentioned.

If you do, be explicit and obvious in your requirements; many customers, myself included, disable TPM.

Spend large amounts of time and effort on so-so solutions that won't do much in the end

And then even more dealing with customers who travel a lot, switch devices often, and so on and so forth who still want your app to work.

Make your own app store, tie each card to an account, and do a per-service or per-time charge that runs out.

And, again, deal with angry customers whose accounts were stolen (perhaps because they use a lousy password) and thus paid for services they aren't receiving.

And the credit card companies who did a chargeback on you.


Does API access token that only have access to public information need to be kept secret? I found a Instagram Basic Display API access token leaked in a website. This token belongs to a Instagram marketing account of this website. Using my leet investigating skill, below are the information i have.

This token has 3 months valid period
This token is in use (i see it's refreshed last week when its valid period is going to end), although i cannot find where it is used
This token is an User Access Token for querying data from Basic Display API. Doc here: https://developers.facebook.com/docs/instagram-basic-display-api
This access token only has read access to public information :(
This token will be temporarily rate limited if using too much

Do you know of any impact i can do with this access token other than rate limiting it?
Also, if this token needs to be kept secret, how can we protect it?

Your question is very specific to the usage of 'Instagram Basic Display API(Long live access token)' which is not just limited to display/access public information of a profile.
You can perform Refresh Access Tokens everyday which leads to DOS attack. (User node and Media node can be accessed only with latest access token). Exceeding Rate limit also leads to DOS attack. You can control entire account if you can get Graph API token :)
Irrespective of it's usage, every API access token to be protected and how to protect is depend on your application architecture. There are many articles listing best practices. Reference-01   Reference-02 Reference-03


Trying To Set Up An SFTP Server Securely On a Synology NAS? Any Advice? So I have SFTP running on a server that I'm working on.  It works fine, and it has a very long random like 20 digit password to login.  I've already looked at the Synology logs and since port 22 is exposed hackers have already tried and failed at guessing a way in (IPs from India) etc.

I'm thinking that it might be more secure to use a VPN which you can setup with Synology and then just accessing the files from there?  That said, a VPN requires forwarding ports too so really how is this anymore secure than just using the SFTP service?

All of these services exposed to the WAN could have an exploit that is discovered (buffer overflow exploits) etc. that could be taken advantage of to gain remote access to the system or run arbitrary code etc.

What steps should I take to secure this?  I have a decent amount of knowledge about this, but I'm always down to learn more.  The first most obvious step to me is change from port 22 to a totally random port.

What else can I do?  How can I keep from being exploited?  We could just use the VPN server and OpenVPN on the clients into the Synology file server, and then use SMB or SFTP still, but since that opens ports too how is that more secure?  Those services running on those ports could have exploits found in Synology itself

The generally accepted option is a VPN. To make it more secure (additional layer) you could use that VPN to access a jump box, a machine that can then be used to access the FTP service after logging in to it. I would suggest a full tunnel VPN and a jump box that allows you to upload files, maybe using a client like FileZilla. I would suggest that you do not use any RDP services directly on the internet.


How secure is a Windows 10 PIN not needing enter? I've searched around about Windows 10 PINs and although have seen a few answers regarding the security of them as a whole, I haven't found any discussing the fact that when I type in my PIN, the desktop will begin logging in without me ever hitting enter. Assuming PIN is enabled for login, what's stopping someone from using something like the USB rubber Ducky and cycling through all possible number combinations up to, say 15 digits. Since there is no part where the user needs to hit "enter", incorrect PINs wouldn't have a chance to be counted and locked out.

From the sound of this, it seems a Windows 10 computer could be broken into relatively quickly brute-forcing the PIN. Is it really this easy or am I missing something? Is a having a Windows 10 pin really a safe option?

EDIT: I have done some testing around my question. So far, manually typing in incorrect PINs, deleting them if Windows doesn't automatically log in, and trying a new one has not caused a lock-out of any sort. If I type in an incorrect PIN and hit ENTER multiple times, I will eventually reach an "are you not a robot" screen. If I never hit ENTER it seems I won't see that screen (so far). I will continue testing and creating a script.

Yes, Windows 10 use PINs as well as passwords, there are options to make PIN usage more secure. Fore example, if you enter wrong PINs several times, it will lock, so after that, you will have to enter unlock PIN, you will see under the login form, this is not so good security option for Windows 10, but it works.


Decent programmer looking to learn to Hack I'm a decent programmer, fluent in several languages.

Python, Ruby, JavaScript, Haskell, and Scheme are my favorites. I'm currently adding Perl to the mix.

I haven't done much "low-level" programming. I've screwed around at the logic gate level and built a few basic chips, but I've never programmed in assembly. While I can program in C, I don't do so often enough to be comfortable with the language.

By day, I'm a web developer, so I'm familiar with some of the basic exploits that are used to break websites.

With my "qualifications" out of the way, I'm looking for some good hacking resources for someone in my position. I'm not looking to get certified or anything, I'd just like to be able to hack.

I do all of the exercises in SICP every year... Is there a "SICP like" book for security?

Any other resources would be appreciated. Also, if anyone could suggest an appropriate "curriculum" for someone in my shoes, it would be appreciated.

Edit:

I should make this question more specific. I'd like to learn the tools and techniques of the trade that "actual" hackers use. I'm not particularly interested in "writing secure code." I figure I should be able to figure out how to do that if I can hack.

When you say "Hack" I'm personally wondering what sort of hacking you mean - it's a fairly varied skill with many different interpretations.

Firstly, by far and away the biggest domain going forward in security will be web. That means SQL injection, javascript bugs, browser bugs, studies of authentication schemes etc. So as others have mentioned, OWASP and the like are fantastic resources.

Not my particular favourite area though, so here's my guide to "things to know" if you want to start looking for vulnerabilities in compiled code on operating systems. One of the first things you'll begin to realise is that there is a lot to know - you are not going to become an uber cool h@x0r!11!! overnight, or actually if you do nothing else for the next 6 months but read up on all of this, top to bottom.

Programming knowledge

You need to know assembly. Contrary to popular belief it is not that hard - most assembly takes the form instruction register, register and translates directly to machine code. You need to know an assembler, such as NASM, YASM or GNU AS. There are two different syntaxes in assembler - AT&T and Intel. They're not that far apart.
You need to know your processor's instruction set. The Intel Software Manuals for IA-32 and Intel 64 are a great resource and explain every instruction you could ever need. AMD publish equivalents; since both AMD processors and Intel processors use the same x86 instruction sets, there are, mostly, a lot of commonalities.
Knowing a debugger and a disassembler will help you. GDB is the canonical debugger used on Linux platforms, WinDBG is one such debugger from windows. Other people like OllyDbg. In terms of disassemblers, many Linux ones are powered by objdump. I personally like objconv from this author. The tool in the field of disassemblers is IDA Pro, which provides much more than just disassembly.
Have an understanding of how to use hex notation and the various word sizes.

Program Internals knowledge

Know C. Know C++. Know the difference between C/C++; for example what effect a template keyword has. Know what name mangling is and why it exists. Know what C cannot do which assembly can.
Understand how your CPU represents data and which C types most closely represent a register.
Binary file formats: knowing how executables work is very important, especially what formats they exist in and how to manipulate them. You don't need to know the internals of the ELF, COFF or PE formats unless there's a really hairy exploit going on, but knowing how to extract symbols from these files and how data is laid out in them generally will give you an advantage.
Shared object loading. Understand how shared objects or DLLs work and load.
Understand the basic run time constructions of your program. Where is the "heap"? Where is the stack, what is on it and how does it work? Where is your vtable and how does that work?

Program Internals for other languages

Nobody said you'd be working with C/C++ programs, although if you're looking at traditional, OS software it probably is C/C++. That said, you may be interested in python or jvm bytecode and how each of these runtimes work. Or perhaps the CLR.

Program environment - Operating Systems I

Basics. You should know that there are permissions and what they mean. You should know who the administrator account is, what the default is and how you acquire administrator access normally (e.g. root vs Administrator group).
Program environment. You should know where and how config for programs and the OS is laid out. You should know how services run and as what user. How do programs run automatically/on boot? How is media loading handled?

System subversion - Operating Systems II

Know the difference between the various CPU Rings.
Know how drivers are loaded into the operating system and what they can do.
Have an accurate idea of how the OS handles permissions, resources, filesystems etc. Better if you know exactly how.
Know about mechanisms for intercepting system actions.
Understand how to perform shared object injection on your system (1, 2).
Know how various subsystems in both user and kernel space work and how to attack programs over these subsystems.
See here for OS internals.

Networking & Network Services

Knowing something about networking is important. What does a packet
look like? What is the OSI stack? How do you inspect packets and
network traffic; how do you connect to a network from your system?
Know common network services for your target platform, most commonly HTTP, SSH. Understand how they can be exploited.

Common exploits and their defences

Know what smashing the stack is, ret2libc.
Know what ASLR and stack canaries are.
Know about vptr exploits.

Analysis tools

Know about fuzzing, static analysis and possibly instrumentation.
Know some tools for achieving this, like pintool, splint and peachfuzzer.

This list is probably incomplete and reflects a set of knowledge that should be helpful for understanding how reverse engineering works and how you go from there to finding vulnerabilities and exploiting them. I do not, myself, know absolutely everything in the above list inside out and I've been researching this stuff for a while. As I said, becoming good at this takes a lot of time, dedication and patience.

Once here, you can start to study applications and how they process data and begin to work out how exploits against them work, such as PDF/Flash/Java vulnerabilities.


The Economics and White Hat Nature of NSS ExploitHub This question is about the economic model employed by NSS with their ExpoitHub exploit marketplace (site link) and whether it jives with the white hat claims of the company.  The company has made news this month by offering bounties of hundreds of dollars for weaponizing a dozen known vulnerabilities (company offer).

This business model seems to be a variation of the long awaited Holy Grail solution of creating a marketplace for the good guys which will be self-perpetuating and a win-win for all interested in enhanced security.  The company quotes H.D. Moore (first link above) and others in support of the concept.  His quote suggests this weaponizing activity is benign because it is only focused on non-zero-day vulnerabilities.  In the press eEye’s CTO Marc Maiffret (link) provides a more negative comment along the same line of thought "If you are a company getting exploited by known vulnerabilities, your security is not doing its job.”

NSS states is that only 1,000 of 15,000 to 17,000 known critical vulnerabilities have exploits available in Metasploit  and that this gap presents a great opportunity for exploit writers to support the pen testing community.  The site itself is offering the exploit authors 30% of the revenue and selling unverified exploits for as much as $1,500 each.

Who would pay $1,500 for a single specific exploit?  Wouldn’t a simple security audit identifying the vulnerability serve the same purpose passively as a third party penetration tester demonstrating the weakness actively with his purchased attack?   If that is the case then is it time to suggest that folks purchasing such exploits might not be wearing such white hats or am I missing something important?

I think you are absolutely along the right lines. The only use for a developed exploit for a known vulnerability is to prove to a disbelieving client that it can be done.

The vast majority of pen testing for a mature client is to confirm/refute their security posture. They do their job, secure and harden the architecture, platforms and applications and then run a penetration test to see whether they missed anything or misconfigured.

Even when our testing takes escalation and vulnerability chaining into account, the usual scenario is:

Run external tests - see what vulnerabilities exist
From point on DMZ run tests assuming attackers beat your 1st layer
From point on core network run tests to see what an internal attacker, or one who passed your outer layers can do

While test teams really enjoy testing which allows them to run a full suite end to end, they are getting rarer, as it is not as cost effective for the client.

The key assumption has to be: if an exploit exists which could provide an attacker with a useful way in to a high value target it will be weaponised, and funded by groups who can pay far more than people like NSS.

Practically, once a vulnerability is known, you should protect until a patch comes out (use other mitigating controls) and then patch. The actual exploit itself isn't necessarily as important.


Concerns regarding a password manager web app I've written a password manager in JavaScript. It works in a browser.
Try it out

Are there any fundamental issues with the concept of a web based password manager?
Should I be concerned if hashes linger in memory longer than they should or is there some fundamental issue with how browsers work that makes this system insecure?

Here is the main source file, if you want to take a closer look.

EDIT: To clarify, this app runs 100% locally, has no external dependencies and doesn't store any information except some settings in a cookie if you want to.
This is a deterministic, hashing password manager.

EDIT 2, to be extra specific: If I store user input in a variable, and the resulting hash in another variable, how plausible is the threat of that information leaking?

If someone discovers a vulnerability in a browser that lets an attacker read data across web page/tab boundaries then there's a risk that they'll be able to extract information from it.

A browser is essentially a container for applications so all those security implications apply.


Using GET to submit username/password? From what I understand using GET to submit usernames/passwords is a security issue because the username/password are part of the URL which can show up in browser history.

Is this still an issue if the login GET request is made using AJAX?

From what I understand using GET to submit usernames/passwords is a security issue because the username/password are part of the URL which can show up in browser history.

That's not the only issue. Using GET for situations where the user is submitting data opens up your application to CSRF vulnerabilities.

For example, I could embed <img src="http://yoursite.com/login?username=something&password=somethingelse">, which may log visitors on my site out of your site due to the call to the login handler. This specific example depends on implementation, but other attacks can be made. There may be cases when an attacker wants users to be logged in to their account.

Besides that, other loggers on the way (your ISP, etc) may log this for a longish period of time. Of course, the same can be said about POST request, but usually the full request dtails won't be kept for long.


custom Origin header to bypass CORS protection against CSRF CORS (cross-origin ressource sharing) can be used to protect webapps from CSRF, before accepting a request, the server verifies that the host specified in the Origin header is among the hosts allowed in CORS Access-Control-Allow-Origin header.

if so, then can we bypass the CORS protection by setting a custom Origin header in the CSRF exploit ?
example :

<?php
header('Origin: www.already-allowed-website.net');
/* the rest of a simple POST CSRF exploit... */
?>

It does not matter what Origin header you set in the response from the server to the browser as you do in your example with server-side PHP code.
The browser does not care about this header.

Relevant for CORS is only the Origin header sent by the browser to the server. If you would be able to fake this from inside the browser you could bypass the protection. But, Origin is one of the headers which can not be changed within XHR or similar requests so such a bypass should not be possible.


Using browser XMLHttpRequest to initiate credit card transaction with processor? I have a website where people can make purchases.

The entire website is served with https.

On the first page, I accept user profile data and generate a random ID for my client and store that in my database.

I then pass the user ID to my second page where I accept user credit card data. When the user submits their information on this page, I make a POST XMLHttpRequest to a server API that I control, sending over the credit card data and the user ID.

This server API then queries my database using the user ID, and if it finds a match, then proceeds to send the credit card information to my payment processor. I am essentially using the user ID as my API key.

The credit card information would never hit my server. Since I can't store my API key client side, I am instead generating 1-time user IDs to validate API calls. I would need to update my database so that the same user ID couldn't be called again to validate my API.

Would this be secure? My limitation here is I am using Weebly, which I do not believe allows server side code. So instead I'm figuring out another way to validate API calls.

This question is based on a similar question

I wanted to preemptively address some of the attack vectors in the top answer:

1) Leaked credentials

This seems like the main vulnerability with client side API calls. However, I am creating a 1-time user ID, which is validated and essentially acts as a 1-time API key. So there is no leaked credentials, as all credentials can only be used once.

2) Altered order data

The user data (e.g. billing amount) would be validated against my server side database. The only thing they would have control over would be their credit card number and user ID.

3) Hijacked calls

I suppose there is no CSRF that can be done here.

4) Open API

I guess anyone could send a request to my API. I could whitelist my API to a specific IP (however Weebly sites share IPs) and set up throttling.

This is potentially a reasonable approach, but it comes with some conditions that may not make it palatable for you to use.

Before I begin I think it's worth me mentioning that I worked for a PCI ASV/QSA organisation for a number of years and performed quite a few PCI assessments during that time. I'm a little rusty on the very latest standards but I don't think anything I mention here has changed significantly since I last worked on this stuff. I am, however, just a random dude on the internet, and you should speak to your PCI QSA and payment provider directly (which may be your bank) to ensure proper adherence to requirements. PCI DSS compliance is usually a contractual obligation with your payment provider or bank, and failing to take the necessary steps to be compliant may land you in breach of contract (or worse, investigated by your jurisdiction's data protection ombudsman).

The PCI Security Standards Council published a document called Best Practices for Securing E-Commerce which I suggest you read, as it is a very useful document. It outlines the best options available for merchants who want to have payment facilities on their website but don't want to have to go through the hassle of PCI DSS certification.

The document calls the method that you're proposing the "JavaScript Form process" (see Section 2.4), and it considers it to be roughly equivalent in security to a direct form POST process where the customer enters their payment information into a form on your website and it posts the content to the payment provider.

The document provides a reference example as to how this should be implemented. However, it is important to note that they also state the following:

  Merchants using a JavaScript e-commerce implementation may be eligible for PCI SAQ A-EP, providing they meet the eligibility criteria of that SAQ. Merchants should consult with their acquirer (merchant bank) or with the payment brands directly to determine whether they are required to validate their PCI DSS compliance and which reporting method they should use. SAQ A-EP for PCI DSS v3.2 currently includes 191 requirements.

What they mean by this is that, if you meet certain requirements, you only have to be certified as PCI SAQ A-EP complaint by a PCI QSA (Qualified Security Assessor) instead of certified for the whole of PCI DSS like a payment provider. The PCI SAQ A-EP requirements effectively state that if you're not touching card details, never retain any card details, use a PCI DSS compliant payment provider, and only control the web page into which card details are entered before being sent directly to the payment provider (either by POST or XMLHttpRequest) then you "only" have to get certified to the less-comprehensive PCI SAQ A-EP standard by a PCI QSA.

Ultimately what this means is that if you use the direct form POST or JavaScript form methods, you still need to get assessed to SAQ A-EP standards. The overview of the standard requirements is as follows:

Requirement 1: Install and maintain a firewall configuration to protect data
Requirement 2: Don’t use vendor-supplied defaults for system passwords and other security parameters
Requirement 3: Protect cardholder data
Requirement 4: Encrypt transmission of cardholder data across open public networks
Requirement 5: Regularly update anti-virus software
Requirement 6: Develop and maintain secure systems and applications
Requirement 7: Restrict access to cardholder data by business need to know
Requirement 8: Identify and authenticate access to systems
Requirement 9: Restrict physical access to cardholder data
Requirement 10: Track and monitor all access to network resources and cardholder data
Requirement 11: Regularly test security systems and processes
Requirement 12: Maintain a policy that addresses information security for all personnel

The full standard goes into specific details about what does and does not constitute satisfactory adherence to these requirements.

If all this sounds way too complicated and costly, don't worry, because there's an alternative. If you look in the best practices document I linked, in section 2.2, they describe an iFrame approach. In this approach you put the payment provider's payment page inside of an iframe, thus having the payment information (card details) entered into a page whose security origin cannot be tampered with by scripts running on your page due to the Same Origin Policy (SOP). This carries with it a greatly reduced set of compliance requirements:

  Merchants using an iFrame e-commerce implementation may be eligible for PCI SAQ A, providing they meet the eligibility criteria of that SAQ. Merchants should consult with their acquirer (merchant bank) or with the payment brands directly to determine whether they are required to validate their PCI DSS compliance, and which reporting method they should use. The PCI SAQ A for PCI DSS v3.2 questionnaire currently includes as few as 22 requirements.

As you can see, you're going down from 191 requirements to as few as 22, which is much simpler and cheaper. This also reduces the amount of development you have to do on your side of the fence, because everything is handled by the payment provider via the frame.


How is it secure for Venmo to ask for credentials? When linking a bank account, one of the options on Venmo is to provide the username and password of your online banking account. I can't seem to find people criticizing this practice, which surprises me, since I feel like it goes against every rule of credential security.

Wouldn't Venmo have to store the password in plaintext to use it, i.e, send it on to my bank for verification? Wouldn't that create inherent vulnerabilities? How is this an acceptable business practice? Am I missing something?

A similar situation seems to happen with Paypal. When asked to enter banking information it claims 'It's safe to share this information. Paypal doesn't save it'. But Paypal is clearly the intermediary between you and your bank and, it seems to me, would have to decrypt and re-encrpyt the password at least once. And since Paypal owns Venmo this could be a very similar method now.

From following the references at the Venmo Wikipedia Link (although they may be slightly dated) mentioned in the comments, I would be very hesitant to link a bank account or credit card to Venmo. Although having Paypal's fingers in my stuff doesn't feel much better.

Best practices for using Venmo seem to be to transfer a small amount into your Venmo account rather than linking your life savings to it.


LDAP Security problems? I have installed many Active Directory (AD) based networks and have applied various standard security templates based on best practices, however I have never really looked at LDAP on a deeper level and after reading recently about the OSX Lion LDAP issues  (The Register and Slashdot), I am rather concerned and quite worried.

I have spent a while reading up on this, but, I keep seeing conflicting reports. Is there any solid information on what actually the problem is with?

In addition, I was always under the impression that with security, you treat everything as worst case scenario/infected/whatever... guilty until proven innocent! If this is even possible, surely it is the LDAP server that is responsible rather than just the client?

Having done the same mistake myself a couple of years ago:

Most protocols/software will return an error code if you try to login with a valid username (other than "anonymous") and an empty password. That is even true for most systems that allow some kind of anonymous usage without being logged in at all.

For LDAP, however, the common case is that the server allows logins with any username and an empty password. The user will end up as being anonymous. But the login returns a status code indicating success.

RFC2829 says:

  An LDAP client MAY also choose to explicitly bind anonymously. A client that wishes to do so MUST choose the simple authentication option in the Bind Request (see section 4.1) and set the password to be of zero length. (This is often done by LDAPv2 clients.) Typically the name is also of zero length.

So, now imagine that the login is not done by the user directly. But the user logs into some other software, and this software takes the username and password and does an LDAP login behind the scenes.

If this software blindly trust the "success" result from the LDAP server without having a special case handling for empty passwords, boom.

That software might even try to read some information about the current user such as the email address. But if LDAP is used as an directory of people, this information may be accessible for anonymous users. LDAP servers are often only reachable from within the company network and not from the Internet.

I said at the beginning, that I did this mistake myself. Our software supports many different kinds of authentication front and backends. LDAP was the only effected system of all the ones we support.

To ensure that this will never happen again, we now globally reject empty passwords for all authentication systems, unless the system is passwordless such as single-sign-on services and smart-cards. And we added an additional test case to our documentation (test good case, test wrong password, test empty password).


Is RIPv2 MD5 authentication insecure? While performing a vulnerability assessment, I stumbled upon RIPv1 poisoning routing table attacks. The recommendation is to use RIPv2 with MD5 authentication. The idea is that the routes need to be authenticated by a password before becoming active.

Isn't MD5 broken? I feel unsure in recommending this to the client, is this insecure?

MD5 was never broken, but it was discovered there could be generated collisions hence weakening it.

I would suggest OSPFv3, it allows SHA or MD5.

OSPF is not as simple as RIP, it is intended for more complex networkings, but IMHO would be a very good choice complexity/authentication security.

This is a sample cisco config using SHA-512 (source)

interface GigabitEthernet 0/0
 ospfv3 1 ipv4 authentication key-chain ospf-1
 router ospfv3 1
  address-family ipv6 unicast vrf vrf1
   area 1 authentication key-chain ospf-1
   area 1 virtual-link 1.1.1.1 authentication key-chain ospf-1
   area 1 sham-link 1.1.1.1 authentication key-chain ospf-1
   authentication mode deployment
!
key chain ospf-1
key 1
   key-string ospf
   cryptographic-algorithm hmac-sha-512
!


I've encountered JavaScript attack code - how do I search for information on the exploit's specifics? So, I clicked on a reasonably-looking LinkedIn invite, not thinking about hovering overing the link first, since usually the e-mail client warns me about such things.

Once I realized I landed on an exploit page, I quickly copied the source (containing some obviously guilty JavaScript), closed the window, and deobfuscated the attack code proper (homebrew-encoded wrapped in an eval).

EDIT: here's the pastebin of the deobfuscated code, followed by the actual HTML attack page.

Fortunately, it looks like the payload wasn't deployed in my case - the attack targets PDF and Java browser plugins, of which I had none (I do have Java installed sans plugin, but the version looks to be too recent for the attack anyway).

However, as I'm no JS expert (and much less a JS exploit expert by inference), I tried to search for the attack code to make sure I'm not affected. No results so far.

Of course, this makes sense - public-viewable code like that would attract skiddies and anyone else wishing to use it for malicious purposes.

Nevertheless, given the JavaScript attack code, how can I find information about the exploit?

This looks like a pretty good example of this malware being reversed (and a step-by-step how-to) by someone else. I just searched the following on google.

Basically it looks like you got attacked with the some new variant of the infamous blackhole exploit kit.

If you do a search throughout the pastebin that you linked for 'java' 'flash' and 'pdf' you'll see references throughout which essentially translate to 'download and open this' in the hope that one of the many exploits present in the kit will work. The first link I've posted shows a good break down of this is done.

If no analysis had been done by the above authors however, i'd suggest going the route that Michael suggested and loading up a VM image. That being said, it still has its own risks. I'd recommend, if you want to do this on a regular basis, having an old laptop or desktop machine dedicated to doing this kind of investigation. This question might also help you in future.


Best Security Method for SSH Access I have been starting to think about security in a bit more depth recently and have hit a few questions which I would really value opinions on.

For years I have had the same SSH Keypair to get to my own servers, github etc. I have secured my private key and kept it that way. I have the private key between multiple machines, work laptop, private laptop and mobile device. Now whilst I dont see this as an issue because I never know where I will need to connect from to sort issues etc. Recently whilst reading some blogs about how an unscrupulous employer scanned and collected private keys on their employee laptops it made me think about who could potentially have access to my machines. my current employer backs up their laptops so in essence my private key could be stored anywhere on their systems and allow anyone who has access to these systems access to my key.

So what is the best way around this issue? I need my keys on multiple machines/devices so how do I manage this and keep them all secure? I have read about separating out keys to single devices, servers and users

User1 -> Server1 (1x Keypair)
User1 -> Server2 (1x Keypair)
User1 -> Server3 (1x Keypair)

This doesnt really solve anything though as it just means more keys to manage with hardly any security benefits.

The next option would be to change the logins from Key based auth to TOTP authentication (Username, Password and Time-based One-time Password). This would get rid of the need for having a private keypair, but still allow access to my servers. Of course I would still need keys for sites like GitHub etc.

Does anyone have any other thoughts on this?

You can encrypt your key file and ssh will prompt you password to decrypt when you are connecting to your server.

ssh-keygen -p [-f keyfile]

ssh-keygen will prompt for a password used to encrypt the key.


Login Password not encrypted So, I was just playing with BurpSuite when I found something I didn't understand.

When using BurpSuite on banking websites, I see that after I supply the credentials, the form transmits an encrypted password.

Whereas when I look at some eCommerce websites, their login form don't send encrypted password, i.e the password can be seen in the BurpSuite in plain text.

Now, what i don't understand is, is it important to encrypt the password send by login forums of websites and if yes how badly it can affect?

It is still quite common that credentials are transmitted in plain text over a secure communication channel (HTTPS). In case the communication channel is not encrypted we are talking about an entire different problem.

The key here is that the communication channel is encrypted with strong cipher suits. When performing a man in the middle attack (e.g. sniffing the connection), a certificate error is displayed on the client's browser.

  Is it important to encrypt the password send by login forums of websites and if yes how badly it can affect?

From my personal (attacker) perspective it doesn't really matter whether you transmit the plain text password or an encrypted or hashed version of the original password.

Once either one is obtained through a man in the middle attack, they can be replayed / re-used by an attacker.

However, one significant difference is that the server will never receive the plain text password when the second option in the diagram is used. Therefor it will not reside in memory.

In case TLS is stripped from a load balancer and requests are transmitted internally over HTTP this would be considered a better approach.

As you can see, it depends on what you consider a threat and what you are defending against.

Please note that a TLS should not be considered the "holy grail" and that defense in depth should be applied when ever possible.


Is encryption of passwords needed for an HTTPS website? I am in a bit of confusion as we have been asked to AES encrypt passwords before sending it to the server. The whole website communicates over HTTPS with the server and uses secure cookies.

AFAIK, HTTPS uses an SSL 128 bit encryption (could be 256 bit, not sure) and this happens at the Transportation Layer. I am assuming as long as the client is not compromised, an attack at Presentation or Application layer is not possible. Thus, once SSL encrypted, I think information will reach the server safely.

So is it still required to encrypt valuable information such as passwords at the client side before sending it to the server?

Encrypting the password before sending it over HTTPS probably doesn't add more security.

Consider: how is the password encrypted by the sender, and how is it decrypted by the receiver?
If you use a symmetrical algorithm, then how did they negotiate the key? If the key is built into the client, anyone who reverse engineers the client will have access to it.
If you use an asymmetrical (i.e. public-key) algorithm, either to encrypt the key or to negotiate a key for a symmetrical algorithm... you're just doing the same that SSL/TLS is doing for you.

Simply use the highest available version of TLS, with the longest key that your server and clients both have available.

Just for completeness: HTTPS uses SSL/TLS. It originally stood for "HTTP over SSL". Nowadays SSL has been found vulnerable, and you should use its successor TLS.

On the server, you make a hash of (password + salt value). There is a lot of information about how to do safe web-based authentication on Stack Overflow's Definitive Guide to Form-Based Website Authentication.


where to get more information about Malware Where I can find more information about Malware, like its name, malware family, its behavior, first seen, which type of file its use, its internal code, etc. If someone knows any source of Malware Repository or CSV File source or any website from where I can get these details for like name, malware family, description, threat actor attribution, file type, environment, etc.

I got some of the related links but it does not contain all malware details

https://any.run/malware-trends/

https://www.av-test.org/en/statistics/malware/

Many antivirus software suppliers provide a public accessible database of malware.
There you can find detailed information about the type, impact and family of a particular malware.

Examples:

https://www.avira.com/en/support-virus-lab (Avira)
https://www.microsoft.com/en-us/wdsi/threats (Microsoft)

In addition to that, you can upload malware to Virustotal for a detailed summary of the malware's behavior.


Why can't I generate my own JWT to fake authentication? JWT tokens are self-contained. If a valid JWT token contains username and the token is valid, then the endpoint will think user is authenticated.
The token can be decoded and all fields seen.
What if I generate token on my side and fill it with data I saw, how will the system distinguish my token from it's own ones?

Simple: A JWT must be properly signed or encrypted with the private key of the authenticating server.
If you don't have that private key then you would have to sign/encrypt with your own private key. You can do that, and thus generate a valid JWT, but the application you send it to will easily be able to tell it was signed with the wrong key, and thus will refuse to accept it (assuming that there aren't mistakes made during the JWT validation process).


What are common services that are being misused in UDP amplification DDoS attacks? I have been learning about DDoS attacks and how to protect from it. I have a question regarding DDoS attacks. What are common services that are being misused in UDP amplification DDoS attacks?

The US-CERT lists a few. That list can also be easily found using a web search engine and the keywords in your question:

  DNS
  NTP
  SNMPv2
  NetBIOS
  SSDP
  CharGEN
  QOTD
  BitTorrent
  Kad
  Quake Network Protocol
  Steam Protocol
  RIPv1
  Multicast DNS (mDNS)
  Portmap


How does resetting passwords twice increase security after a breach? In regards to https://mva.microsoft.com/en-US/training-courses/how-to-avoid-golden-ticket-attacks-12134

They mention several times that resetting not only AD passwords twice but also local computer passwords twice. How does a double reset help over a typical reset?

If an OS effectively remembers the current password and also the previous password to force a true password reset, you will need to change the password twice to flush the old password hashes from the system.

This usually is mentioned when giving instructions to change the KRBGT account password on a Windows Domain with the added caveat that some time needs to be allowed between the password changes so each new password propagates to all the domain controllers before the next reset is done so you don't have interesting issues crop up.


Should I only let my TV connect to the guest WiFi? According to this Kaspersky blog post, it is a security risk to connect IoT devices, such as Smart TVs, to my home WiFi.  It claims I should use my guest WiFi network for this.
Is this true?  Is it a security risk to use my regular network to get internet to my TV?

Using a guest WiFi for IoT devices is essentially just a practical, easy to understand implementation for network segmentation. The goal is to prevent lateral movement between and from IoT devices. As a typical user isn't aware of such terminology and how this should be implemented, this might actually be a good tip.
However, in order to increase security, using this recommendation has some prerequisites:

The home router must have a guest network feature, obviously, but not every router has it.
The guest network must be isolated from the home network.
Ideally, all devices on the guest network should be isolated from each other, too.

Ziv Chang (Trend Micro): Inside the Smart Home: IoT Device Threats and Attack Scenarios sums up some typical security measures for IoT devices, the network segmentation among them:

Map all connected devices. All devices connected to the network, whether at home or at the enterprise level, should be well accounted
for. Their settings, credentials, firmware versions, and recent
patches should be noted. This step can help assess which security
measures the users should take and pinpoint which devices may have to
be replaced or updated.
Change default passwords and settings. Make sure that the settings used by each device are aligned toward stronger security, and change
the settings if this is not the case. Change default and weak
passwords to avoid attacks like brute force and unwanted access.
Patch vulnerabilities. Patching may be a challenging task, especially for enterprises. But it is integral to apply patches as
soon as they are released. For some users, patches may disrupt their
regular processes, for which virtual patching could be an option.
Apply network segmentation. Use network segmentation to prevent the spread of attacks, and isolate possibly problematic devices that
cannot be immediately taken offline.


Log and file Auditing I am going through this PCI compliance for the first time. I have some questions because it is not clear what they are expecting and maybe I am over thinking it.

Question 1: 10.3.1 through 10.7 Access tracking

You are supposed to log every time a user elevates their permissions to perform a task and log what task was, who it was, date time, and why.

Does this mean all PCs and Servers? Or is this just server? Or is this just the PCs we have in the call center that take credit card info and the server they communicate with?

Question 2: 11.5 File integrity monitoring.

Is this just the PCs in the call center and the server they communicate with? or is this everything? Obviously, I would like to have everything but that is a lot of data to go through every day. Or my Splunk account needs a serious upgrade on data.

Logging and FIM must be enabled on all systems within the in-scope network segments. If you've a call centre, this will mean at least the users' desktops as well as the servers supporting the infrastructure. Ideally, your customer service agents won't have administrative profiles on their systems so the number of logs you'll receive related to privilege escalation will be limited.

While Splunk agents will gather and ship logs for central analysis, it's not really a File Integrity Monitoring solution. You could use software like OSSEC or Wazuh or implement similar functionality using Microsoft's AppLocker which would allow you whitelist applications and monitor changes.


DNS Spoofing vs ARP spoofing, the relationship? As I understand, ARP spoofing can only be done on the LAN-side of the router?

DNS spoofing, can that be done either side of the router?

In order to do DNS spoofing, do you need to perform ARP spoofing first?

ARP packets are layer 2, which is to say, they are never routed.  They only have meaning and context in a network configuration where two devices can both 'see' the same wire.

DNS packets are layer 3 (usually UDP/IP, sometimes TCP/IP) and are routable.  So yes, spoofing for DNS can be done anywhere as long as it eventually routes the packet to the target machine.

ARP spoofing is not required for DNS spoofing, and in general a DNS spoof attack will not involve ARP spoofing.  Since DNS is usually over UDP, packets can be spoofed without the complexity of ARP spoofing - you just need to fool the application layer, not the IP stack or state.  ARP spoofing is used to fooling the network layer, so that (for example) a TCP handshake can be made between an imposter machine and it's victim.


How to accept only user identity keys of type ed25519 on OpenSSH Linux server? I want to force all users to use only ed25519 type keys when logging in via SSH / SFTP to a Linux server which is running a recent version* of OpenSSH.
Some general reasons for putting controls on SSH keys might include:

In many cases, SSH keys have been completely overlooked in identity and access management planning, implementation, and audits. Users have been able to create and install keys without oversight and controls. This has led to violations of corporate access policies and dangerous backdoors.
Information security starts from controlling who is given access to systems and data. If there is no control over access, there is no security, no confidentiality, no integrity, and no guarantees of continued operation

Source: https://www.ssh.com/iam/ssh-key-management/
I am not trying to accomplish a full key management implementation. And I do not wish to remove the ability for a user to manage their own SSH keys (including adding, removing, changing the keys). My only objective is to mandate that the key used is of type ed25519.
How can this be accomplished while maintaining the above user privileges and while maintaining this setting?
AuthorizedKeysFile  .ssh/authorized_keys

The main (non-default) sshd_config settings I'm using on this server include:
The only host key enabled:
HostKey /etc/ssh/ssh_host_ed25519_key

PermitRootLogin no
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
AuthorizedKeysFile  .ssh/authorized_keys
KexAlgorithms curve25519-sha256@libssh.org
MACs hmac-sha2-512-etm@openssh.com
Ciphers chacha20-poly1305@openssh.com
AllowUsers user@host ...

However, with those settings a user can still select an older user identity key type and use it to log in. My only objective now is to stop a user from getting access except via an ed25519 user identity key. How?
*Actually running: OpenSSH_8.1p1, OpenSSL 1.1.1d

According to https://unix.stackexchange.com/questions/549610/limit-sshd-to-use-only-ssh-ed25519-keys-to-authenticate

Question:

  I am trying to configure my sshd on ubuntu 18.04 to accept only ed25519 keys to authenticate, at the moment the server accepts ssh-rsa and ssh-ed25519. Any idea to achieve that? thanks!

Answer:

  PubkeyAcceptedKeyTypes ssh-ed25519-cert-v01@openssh.com,ssh-ed25519 worked for me.

This worked for me too. I edited /etc/ssh/sshd_config and added this setting:

PubkeyAcceptedKeyTypes ssh-ed25519-cert-v01@openssh.com,ssh-ed25519


Could Google Chrome's lack of a download confirmation dialog be a security vulnerability? Suppose the user is playing a game like flappy bird that requires constant tapping in the lower left area of the screen (where the downloaded file needs to be clicked).

Then while the user is playing the game a file is downloaded by the website and and then the user clicks on it because the user was playing the game and opens the file.

It could be an EXE file which could harm the system and infect it with malware.

Other browsers like Firefox have a prompt which stops this but Chrome doesn't and I think it is a security issue.

Yes, it can be a security vulnerability.
To exploit it, consider the following scenario.

The attacker somehow convinces the user to visit a website under attackers control.
A DLL is automatically downloaded to the Downloads folder.
The user downloads a legit installer/setup/whatever to the Downloads folder.
It is possible that this software is vulnerable to DLL load order hijacking.
When the user starts the legitimate app, basically it will load the malicious DLL inside the Downloads folder instead of the legitimate one.

Fortunately, this is not a very probable scenario, as there are a lot of unknowns/ifs in this attack. Can the attacker guess what other legitimate files the user downloads? Is it possible hijack the DLLs in this software? Will the malicious DLL be blocked by Chrome download scan?
But if the attacker is lucky, it is even possible to elevate privileges to admin because the installers usually start with admin privileges, and this valid UAC prompt is usually accepted by the users.

The originally proposed scenario is less likely I guess, as people don't usually start unknown executables from the Downloads folder. But some people will do for sure.


Executing arbitrary commands through iptables-restore input During a pentest I found a way to add arbitrary iptables firewall rules to a server. These rules get applied by way of the iptables-restore command, and I've been wondering whether there is any way to execute commands by manipulating the input.

My starting point is the following, which will output the help for iptables-restore:

printf '*filter\n--help\n' | iptables-restore --test

So I know that options are executed as expected. Now, the man page mentions a --modprobe=command option, which is described as:

  --modprobe=command

  When adding or inserting rules into a chain, use command to load any necessary modules (targets, match extensions, etc).

Great, I thought, I can execute a command by providing a non-existent target and coaxing iptables into probing for it. I've tried the following (and variants thereof):

printf '*filter\n--modprobe=/some/command -A INPUT -j sometarget\n' | iptables-restore --test

But this just gives an error without attempting to execute /some/command:

  iptables-restore v1.4.12: Couldn't load target `sometarget':No such file or directory

I've also tried using a module which exists but isn't currently loaded, but the module gets loaded successfully without calling the custom modprobe command.

Any hints or suggestions on where to go next (or any other routes I could investigate) would be greatly appreciated!

Edit: --modprobe seems to be out of the question, so the question becomes: are there any other potential exploits possible by passing malicious rules to iptables?

The --modprobe option is part of the command line syntax of the iptables-restore command. It isn't something that iptables-restore parses as input.

So if there's a sudo rule that allows you to run iptables-restore with arbitrary arguments, you can pass --modprobe=/bin/sh or variants thereof. But if all you can do is pass input to iptables-restore, then this particular method doesn't allow arbitrary code execution.

Note that I do not assert that iptables-restore doesn't allow arbitrary code execution in some other way. In particular, if you can control the environment but not the command line options, export MODPROBE_OPTIONS='-d ~/malicious_modules' (in combination with a rule that triggers the loading of a module) looks promising, but I haven't tried it. And of course modifying firewall rules can cause all kinds of havoc (starting from trivial DoSes and building on from there — often services restricted to localhost would be dangerous if exposed to the whole Internet).


Map CIS benchmark recommendation to Severity I am using CIS benchmark framework to audit my Linux OS, and I have received various pass/fail results. But is there any way to prioritize the fail results ? Is there any severity mapping available for these recommendations?

Benchmarks
The CIS benchmarks are designed as an auditing tool, not as a risk assessment tool. The purpose of a benchmark is just that: a measurable point of comparison. The outcome of a CIS benchmark is a pass/fail determination.
This idea works for system configuration because you can set well-known and serviceable configuration sets that meet the most common objectives. While you could make a server do whatever you want, the vast majority of servers have a very narrow use case, and we can set a common configuration benchmark for servers used in these pre-defined ways.
Severity
The concept of "Severity", like one has in Vulnerability Management tools, tries to help provide relevance to a negative finding. In VM tools, this is a calculation of the anticipated impact of the finding. A question asking "what's the worst that could happen?"
This question is nuanced when we are talking about an unexpected vulnerability in how something was coded or used. But when talking about the configuration of system that is working as expected, "severity" does not make as much sense. In a configuration, a setting is either what you want or it isn't.
Priority
But you end up running a configuration benchmarking tool and you have failures. What should you do to determine:

if you should accept the failure
what to fix first

Because we are talking about configuration options, this is not something that you can pre-determine or have someone else figure out for you, unless there are obvious experimental or dangerous settings, or the settings are a form of "hygiene" (password length, permissive defaults, etc.). You obviously rate those settings with a higher priority.
To prioritise your findings, you need to perform a classic risk assessment. Only you can know which configurations are necessary for your environment, and only you can analyse the impacts of misuse/abuse of those settings. What would be risky for one environment would be low risk in another.
The benefit of the CIS Benchmarks, even though they seem overkill, is that you can meet the benchmark and know that you have a strong configuration. They are "Best Case". They take away the need for doing too much risk assessment for each possible configuration option. To accept a failed finding requires you to do the work the benchmark was designed to save you from. You want to determine a "Good Case". And for that, you just need to do the classic work of risk assessment.


VMware server 4.1 -how can I prevent VMs being exposed to each other through VMCI? I have realized there are issues such as virtual machines being exposed to other VMs within the same system when they're connected to the VMCI socket interface. How do we prevent this ?

ESX/ESXi 4.0 to ESXi 5.0 provide .vmx options for VMCI isolation. As of ESXi 5.1, these options have no effect.

[vmci0.unrestricted = FALSE|TRUE]

When its vmci.unrestricted option was set TRUE, a virtual machine could communicate with all host endpoints and other virtual machines that had vmci0.unrestricted set TRUE.

[vmci0.domain = ]

(ESX/ESXi only) All virtual machines and host applications were members of the default domain ("") null string, by default.
If the vmci0.domain option specified a non-default domain, then the virtual machine could communicate only with the hypervisor and other virtual machines in the same domain. This was to organize virtual machines into groups that could communicate with each other.

As of ESXi 5.1, or earlier when configured for restricted communication, the VMCI device has a security profile similar to any other device such as keyboard, video monitor, mouse, or motherboard.
Guest communications depend on the VMCI applications running on the host.
VMCI in itself does not expose any guest information.


x.690 universal class tags implementation reference Can anyone with enough knowledge of X.690 tell me where can I find the official reference implementation for the universal class tags for X.690. (For example: For TLS we can reference RFC 5246.) When I look at line 565 and the lines after it, that makes me wonder how do they know the correct way to implement, let's say T-61String.

I've been trying to find the open source implementation of EMBEDDED-PDV (11), Relative-OID (13) and Character-String (29). Tried looking at bouncy castle but nothing shows up.

Okay, I think I've found it. The link below are for those who might need it:

http://www.oss.com/asn1/dubuisson.html
http://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-X.690-200811-S!!PDF-E&type=items