OpenBSD 32 or 64bit installer? is the 64 bit or the 32 bit installer better? (not counting that if i have x>4 GByte RAM) - so i mean like is there any ASLR in OpenBSD?

https://secure.wikimedia.org/wikipedia/en/wiki/Address_space_layout_randomization
So that 64bit would be advised to use?

On x86 processors, 64-bit mode offers significant performance benefits for some cryptographic operations, in particular asymmetric encryption and signatures; this is partly due to the bigger registers (it helps with big-integer arithmetics, and algorithms which rely on 64-bit operations) and due to the higher number of registers (that's a quirk of x86: 7 usable registers in 32-bit mode, 15 in 64-bit mode). It also gives a boost to floating-point, there again for historical reasons: a processor which knows 64-bit mode also knows SSE2, which is a set of opcodes which are more efficient for floating-point operations than the older 8087 FPU opcodes that are used in 32-bit mode.

Hence, on the x86 processors, 64-bit mode is good for performance (this performance boost more than makes up for the slight memory consumption increase due to the bigger pointers). The same would not apply on other 32/64-bit processors, e.g. PowerPC, where 32-bit mode is recommended for applicative code, except code which needs a very large address space.

OpenBSD implements ASLR. Note that ASLR is a damage-containment feature: it makes it more difficult to turn a buffer overflow into a remote shell exploit. However, the buffer overflow is still there; ASLR just means that most of the time, the attacker will "only" be able to crash the application. The benefit is, in my view, quite marginal.


Windows Active Directory: How do endpoints authenticate the Domain Controller? Windows Active Directory is based on Kerberos and LDAP.  When authenticating via the Domain Controller, how does my endpoint know that it's really speaking to the DC?

Likewise, AD can be used to authenticate for services hosted on other machines (e.g. SQL Server).  How does the SQL Server know that the DC is the real DC?

The DC is not authenticated as a DC, but otherwise as part of the kerberos authentication mechanism both sides require a shared secret (your password). The ephemeral encryption key used to encrypt the as-rep (which has the tgt) in transit is passed using that shared secret. So assuming someone has your password (and your machine account password if you are using windows) he can spoof a dc. Notice that if you want to access any external service the DC needs to know what is the shared secret for that service, so essentially it's being verified on the fact that it needs prior knowledge of everyone's password.


Is it correct to use form field(hidden) for storing Session Token Is it correct to use form field(hidden) for storing Session Token instead of using Cookies? What is the security risk associated with it?

To be protected against CSRF while also hardening against XSS, store your session IDs in cookies (with httpOnly flag) and use separate session-bound form tokens that you validate upon POST. By combining these methods, you prevent an attacker that has found XSS from stealing session IDs, while you still protect against CSRF in a meaningful way. Using the session ID as form token enables an attacker to steal the session ID through XSS.


Is all traffic through a router configured to use openvpn protocol sent through a single port? A home wifi router is configured to use a vpn service, such as PIA, and in particular is configured to use the openvpn protocol. Is all traffic through this router sent through a single port?

Is the following an accurate representation of the flow of traffic between a computer behind a vpn router and a website? (Also is that the correct usage of 'vpn router'?).

Computer sends data to router >> router encrypts data and sends it to vpn server >> vpn server decrypts data and sends it to its destination (e.g. a website)

(reverse)

website sends data to vpn server >> vpn server encrypts data and sends it to router >> router decrypts data and sends it to computer

Thanks for any help in advance. I need this question answered so that I can ask my next question.

Yes, it's exactly as you are thinking.

A VPN connection works just like a proxy: every single connection is encapsulated in another one, connecting your router to the VPN server.

For an external observer, you will have only one very long-lived outgoing connection.


Encrypt a message or sign it with a X509 certificat i have two similar questions about using certificates.

I was reading about a Certificate Authority in a system and i've found that the CA uses PKI adhering to the X509 standard for public key infrastructure to sign a message. I will quote what the CA said:

  Digital certificates are used to establish authenticity of user credentials and to
  digitally sign messages. Signing messages with a certificate ensures that
  the message has not been altered.

Source : https://github.com/hyperledger/fabric/blob/master/docs/protocol-spec.md#42-user-privacy-through-membership-services

I know X509 is a certificat format containing public key so is it possible to sign with a contract?

While I was searching on the Internet for an answer to the first question, I've found that it is possible to ENCRYPT a message using a X509 certificate:

https://msdn.microsoft.com/en-us/library/ms824684.aspx

I am confused as to encrypt we need a private key. Is the key inside the certificate?

I feel your confusion. From your provided link, I copied the first paragraph:

The Web Services Enhancements for Microsoft .NET (WSE) allows a sender, which can either be an XML Web service or its client, to encrypt portions of the SOAP message by using the public key for the recipient's X.509 certificate. A receiver, which can be either a Web service or its client, then decrypts the message by using the private key for its X.509 certificate. If the recipient is the only one with the private key, it is highly likely that only the recipient can decrypt the message. Therefore, to encrypt the message, the sender must have access to the public key for the recipient's X.509 certificate and the recipient must have access to the private key for the recipient's X.509 certificate.

In order to understand these things, you need to notice and laser your attention as to which X.509 certificate the sentence is referring to. Is it from the sender or from the receiver? Here are the two sides:

The sender side has his X.509 certificate
The receiver side has its own X.509 certificate too.

For example, let us analyze this one:

allows a sender, which can either be an XML Web service or its client, to encrypt portions of the SOAP message by using the public key for the recipient's X.509 certificate

Here is the analysis:

The sender is doing the encryption part
The sender uses the public key of the receiver to do the encryption
The sender extracts this public key from the X.509 certificate of the receiver

I tried to analyze the root cause of your confusion. I think, the root cause is the use of for instead of of in the sentences. Can you please confirm if, indeed, this is the root cause?
Most folks want to prove the rocket scientists that they are. But I am more interested in the root causes of confusion as it widens my point of view and allows me to see things in different perspectives.


PGP Secret Key Values calculation I know this is somewhat counterintuitive, but: Does anyone know of any place where I might get intermediate values from PGP when it decrypts the secret values of the Secret Key packets and shows explicitly any special parsing needed to be done on the bytes?

Im looking for something like:

  Given some example private key block and its password:

  the encrypted secret value is _
  the password is transformed into __ using the string to key algorithm
  the internal values in the CFB decryption using key and encrypted data are __ , _, and ___

  etc.

I have read through RFC 4880, but since there are no examples of actual encryptions/decryptions in the RFC, I cannot be sure if my code is correct. I have looked through some of gpg, but its code is filled with so many gmd_s and other variables that all look the same and I get extremely confused, adding to the problem of me not always knowing where to look.

Have you tried using the test vectors in the GnuPG \tests\openpgp folder? The GnuPG source can be downloaded from here.


problem after upgrading from GnuPG 1.4 to GnuPG 2.1 My Debian box decided to upgrade from "gnupg 1.4" to "gnupg 2.1" after some kind of security update.

After this, I am no longer able to use or access any of my keys.

After any gpg command, it says:

gpg: Ohhhh jeeee: Assertion "uids_seen == uid_no" in skip_unusable failed (../../g10/getkey.c:982)

I cannot figure out if there's a particular key at fault or if there is a general problem.

I ended up downgrading and everything works as it did before.  (I used APT pinning to prevent gnupg from upgrading again.)

Aside: as an experiment, I changed /usr/bin/gpg to be a symlink to /usr/bin/gpg2 after the downgrade.  I.e., always use gnupg 2.0 .  Everything works, 'tho, occasionally, I'll get "gpg: Note: signatures using the MD5 algorithm are rejected" for certain secret keys.

Am I forever banished to use gpg 1.4?  Or, is there a safe upgrade path to gpg 2.1?

An assertion is a sanity check in code where the code checks for a condition that should always be true, and will terminate the program if it is false, indicating a bug or data corruption. The assertion you are getting is located here in the code. The comment hints at the purpose of the assertion:

/* If UID_NO is non-zero, then the keyblock better have at least
   that many UIDs.  */
log_assert (uids_seen == uid_no);

My guess is that you have a mildly corrupt key where the number of UIDs in the key differ from the number of UIDs the key claims to have. GnuPG 1.4 may not have had any problem with that and happily accepted the corrupt key (the same function in 1.4 does not have the assertion), but 2.1 added a sanity check that now rejects the corrupt key. It certainly isn't an unrecoverable error. My advice would be to export your keypair in GnuPG 1.4, and then import it in 2.1.


Inputstick : AES-128 encryption (CBC mode) over Bluetooth connection There is "Inputstick" device offering way to transport passwords to computer over USB wireless via:
AES-128 encryption (CBC mode) over Bluetooth connection
http://inputstick.com/index.php/en/about-en/security-en

Assuming it's used to transport credentials (e.g. through KeePass2Android Offline on Android with KP2APlugin plugin (and more about it ) , how would you asses security of proposed solution and used cryptographic algorithms?
(not asking about assesment of used Android hardware: you may assume device is freshly patched, offline with only Bluetooth turned on and only Inputstick paired).

The first thing I would check is what is the entropy source in this device. There is no such thing as strong cryptography without a good entropy source (and also usually a good CPRNG).

Then you need to check how keys and IVs are generated and handled. Keys need to be securely transmitted or negotiated (using something like Diffie-Hellman) this in turn requires authentication to defend against active attackers (MITM). How does the device knows it talks to a legitimate user and not an attacker?


How do AVs scan the file in websites that claim they don't send the files to AVs like Nodistribute.com? So for example one of the famous alternatives to Virustotal aka Nodistribute.com claims that it doesn't send the file to AVs, but if it doesn't, then how can they scan it? just by checking the hash? if so, wouldn't that make the scan pretty much useless?

and if it does send the file to them, then what's the difference between this site and Virustotal?

I believe that they send the files, the reason I think they do is because in the past there was a site that was well known for not sending the files.

It was most known by malware builders, their owners end up with problems with justice accused of helping malicious actors and allowing them to tune their malware, basically partners in crime.

You can search for reFUD-dot-me

If they are really doing it, there is a good chance they will end up as the  reFUD...

https://www.theregister.co.uk/2018/02/15/refud_cryptex_kingpin_goncalo_esteves_jailed/

Or

https://www.zdnet.com/article/hacker-gets-a-whopping-14-years-in-prison-for-running-scan4you-service/


Is it possible to use the aircrack-ng tool to crack a WPA2 Enterprise network? is this tool (aircrack-ng) capable of cracking into a WPA/WPA2 Enterprise network? This tool has major success cracking the passwords of WEP/WPA networks.

If it can, how, but if not, is there another tool that could be used to accomplish this?

Also, what can be done to prevent this type of attack on a network?

Not alone like a WPA/2 PSK attack, where you can simply capture the handshake and bruteforce.

You'll need to capture the "Enterprise" authentication attempt. To do this, you can perform an "Evil Twin" attack that captures the authentication attempt, which can then be subsequently cracked.

Here's an excellent presentation by Matt Neely of SecureState that details the attack: http://www.slideshare.net/NEOISF/attacking-and-securing-wpa-enterpris

Specific Steps of the Attack:

Attacker sets up a Fake AP

Mirror the target SSID, encryption type and band
Configure the AP to accept Enterprise authentication
Enable AP, ensure it is visible to the target

Connect the AP to a FreeRADIUS (with password Wireless Pwnage Edition patch) server that captures auth
Deauth any target you can get within range of your fake AP
Wait for targets to attach to the the fake AP, capture their authentication
Crack the challenge / response pair to recover the password

Hope this helps!


What can I do with an SQL shell using SQLMap? I was just messing around with SQLMap on Kali and I have now got an --sql-shell on the main database. With this, I wondered what I can do now with this access. How would I insert data into the database et cetera is this possible?

Typically, one would use either the --sql-query flag (one line at a time) or your --sql-shell flag (which provides a SQLi REPL, or interactive shell) to test out functionality of the found SQLi against the target RDBMS' capabilities. This is often only needed when outside of the scope of what sqlmap can already perform, capability-wise.

Two prominent examples are:

https://websec.ca/kb/sql_injection#MySQL_Reading_Files

Finding the base directory for LOAD_FILE() by using select @@datadir against MySQL / MariaDB.
Hoping for the default file size allowed or querying it for a fit using select @@max_allowed_packet in this same attack scenario.

https://websec.ca/kb/sql_injection#MSSQL_Server_Hostname

Querying an MS-SQL Server Hostname (select @@servername) or even the productversion/productlevel/edition. In MySQL / MariaDB this same command would be select @@hostname from the sql-shell REPL.


infinity redirection as Dos Attack I was wondering that infinite redirection could be used as a dos attack

in my case, I have this
test.php

    <?php
        $url = $_GET['url'];
        header('Location: '.$newURL);
    ?>

if I use it like http://mysite.com/test.php?url=http://mysite.com/test.php?url=http://mysite.com/test.php?url=http://mysite.com/test.php?url=...

Can that cause dos attack?

I know that the browser will block redirection after so many redirects but I talk about using a specific script to do attack?

No, it is no Denial of Service vulnerability. Even if a single browser were to constantly request resources from your server, it would likely not go down.

A Denial-of-Service attack can have multiple reasons:

A vulnerability that causes the server to crash.
For example, an attacker can cause the server to read /dev/zero. As the file is of infinite length, the server never stops and hangs.
A vulnerability that causes the server to work a lot more on a response than the client for a request. This is called an amplification attack.
Many many people request resources from your server, and your server doesn't have the memory and/or bandwidth to keep up. This is usually refered to as "Distributed Denial-of-Service" (DDoD).

As you see, your "redirect to self" vulnerability really doesn't fall in any of these categories, for multiple reasons:

Any modern, non-malicious browser will stop redirects after a certain amount, and display an error message, as answered by Joseph.
Even if that were not the case, URLs can only have a limited length, so you would end up with ~100 requests, not infinite ones.
A malicious user could just keep holding Ctrl+F5 to infinitely refresh your page and get the exact same effect. The fact that they can do this is independent of your redirect, and can be done to any server.


Using EventStore For PCI Compliance? I have been hearing a lot of good things about EventStore 3 and am looking to upgrade my server event forwarding systems for PCI compliance next year and was wondering if anyone had looked at the possible uses of EventStore in a PCI logging scenario.

Any feed back would be greatly appreciated.

(repost from https://stackoverflow.com/questions/8246223/using-eventstore-for-pci-compliance)

If you thinking about PCI compliancy, you should take note of Section 6.6; at it  widely considered to be one of the hardest (if not THE hardest) term for the compliancy.
The section calls for one of the following:

Reviewing public-facing web applications via manual or automated
application vulnerability  security assessment tools or methods, at
least annually and after any changes
Installing a web-application   firewall in front of public-facing web applications

(for more info on 6.6 read this : http://www.scmagazine.com/deconstructing-pci-66/article/110013/)

EvenStore by itself can not fill this requirement.
Having said that, I`ve yet to see one application/service to provide full PCI compliancy - this is just not possible.

What you need is to combine several solutions to answer several sets of requirements.

For 6.6 I would suggest Imperva Cloud WAF as, currently, it's the only one that comes with full PCI DDS compliancy.

(for more info visit: http://www.businesswire.com/news/home/20120216005411/en/Incapsula-Teams-PCI-Compliance-Security-Service-Providers)

Why choose Cloud?

Well, because this is a "plug-and-play" solution that can be added to any platform. More over, due to "economy of scale" effect made possible with Cloud technology, the price tag drops from several thousands (setup fees) to several dozen dollars a month.

As my first link explains, this not the only way to deal with 6.6 but I think it`s the best one.


How do I verify that my CSRF fix is successful using Burp? I know I can use the the Generate CSRF PoC feature to test whether I have a CSRF vulnerability but once I mitigate this, how will Burp recognize this fix on the next scan? I need to be able to demonstrate to the client that the vulnerability is no longer present by running a Burp scan.

For any CSRF issue, the general demonstration of prevention is showing that repeating the same request with the same preventative token, or with no preventative token, doesn't result in any data on the server changing.

Therefore, perform a legitimate request, send it to repeater, and try performing it again. If it works, the CSRF protection isn't working.

Then remove the CSRF token and send it again. If it works, the protection isn't working.


Where does the encryption happen with an encrypted VPN? I have been trying out ExpressVPN to connect to the internet. I have mostly used this at a coffee shop that I use regularly.

I see this question with answers:

Differences between using Tor browser and VPN

Here the accepted answer says:

  "Both traditional VPNs and VPN services are to protect against
  external visibility into the network. Neither of them will protect you
  from authorized administrators for the network you're on."

I am not sure that I completely understand how the traffic is visible to the network one is on. For example: does this refer to the traffic before or after it is encrypted?

Where does the encryption happen when you use a VPN with encryption like ExpressVPN?

For example, if I am using the WIFI at my coffee shop, is the coffee shop able to see my unencrypted traffic? (Maybe my confusion is not understanding how a "network" in general works).

Your understanding is correct; when using a VPN, all traffic is encrypted on your laptop and remains encrypted all the way until the VPN server.

I think the wording in that answer is a bit confusing because there is more than one "network" here:

The wireless network provided by the coffee shop (wifi)
The Virtual Private Network (VPN).

Earlier in that section, @RoraZ says:

  Let's take a situation with a VPN: you have your remote laptop R and your private network gateway/secure anonymous proxy (G). Now you have a private network IP that is encrypted from R to G. A network admin sitting on G can see your plaintext.

So I think he means "VPN admin" rather than "wifi admin".

As a fun side-note (and where I thought this question was going when I first read it) is that encrypting your traffic does not fully protect you against traffic analysis. For example when using HTTPS encryption, anyone sniffing your traffic can see which web servers you're talking to (everything up until the first slash in a URL, ex security.stackexchange.com). VPNs and TOR hide this because all your traffic looks like it's going to the VPN server, and the VPN server opens fresh connections to the web servers.

Another fun bit of traffic analysis is that, even encrypted, someone sniffing your traffic can see how many packets your're sending / receiving, and the size and timestamps of those packets. This awesome paper:

Identifying HTTPS-Protected Netflix Videos in Real-Time

shows that not only can they tell from the packet size / timestamp data that you're streaming Netflix, but thanks to the way video codecs work (bandwidth spikes when the scene changes rapidly) they can actually tell which Netflix video you're watching.


Is it possible to brute force a card reader lock? Recently they've added a new lock to my building which looks like this:

Now we were given the code to access the building, but not the cards/tags. I swiped my tag used for a different lock and it does beep, so I know it can read one. My question is would it be possible to brute force it or figure out a way to make a card/tag for it? It's super annoying typing in 4 digit code and hitting # on such a narrow keypad. There is no manufacturer listed on it, all it says is "Wiegand", but knowing the company that installed it, be sure it's a Chinese production (meaning a knockoff of otherwise popular product of the same type).

No it isnt possible. Cards do send a Another signal to the wiegand controller than the code, so the wiegand controller wont accept a card entered as a code, or a code entered as a card.

You could ask the landlord or administrator of the building to add the tag for the different lock, into the "authorized list" of that reader or controller. Then the tag on your keychain, which is EM4102, will then work both for the lock where it originally works, and for the lock on your building, so you have one single tag for both locks. Thats not a security risk since nothing is stored inside the tag except for a read-only serial, the tag itself does not know where it belongs to.

But I Think you will get a card. Propably there was keylock or only a code lock Before, and its very common when Rolling out a card-access-system, to just give a common Group code, until cards are rolled out.
Then the common Group code is deleted from system. This to ensure no authorized person is rejected access to the building until the transisition period is over.

I have even seen setups where administrators, when setting up card readers without a keypad, to put a common card inside a "real estate lock box", and give the lockbox code to everyone that should have access to the building.
When all cards/tags are rolled out, then the common card and lock box are removed from the wall and from the authorized list.


Stealing document.cookie from Google domain, is this a privacy breach? When I am logged into the Google and prints document.cookie I could see following cookies. My doubt is what all an attacker can do if attacker could steal these cookies of the victim using exploiting some vulnerabilities like XSS? Is this can be considered as privacy breach? (I think they can get browsing history of the victim, please correct me if am wrong)

.google.com TRUE    /   FALSE   1471942336  PREF    ID=84678a35588b1188:U=9b6b2ee8558b7923:FF=1:LD=en:TM=1408811421:LM=2408870337:GM=1:S=5fOkt0gjybaO4t48
.google.com TRUE    /   FALSE   0   SID DQABBBAAEBAAAZdehBqmKnR-Sp5mfXSGwwDMtHLgyKm09sQBMsaMn0qOcsjn8Ddivbb80BCBbi11Jtg1H3Wy-EvjYH1AneL8aG9frhTl9cZ33Ba2bW3L0ARyQN_Zbvpdvtd3KtEj6p1783XXFbnp-uWFHD9lqBDyvmln7bg1vdeINZm9vu1PmwMr0Do6_X9FQWOL1yLjhhnt5eWTeQMXdKgovm4xRkF9PlFR9KBIqtDMphCFx8bmB7M7oa4z5MXlHlmInAgfdEKGvA3C9euewCH0kFi2D1xpGFfjXmCHeYzsWxFAjtWbsxuSWqqMI2MDErDzMArN160A2Gouxwzpz0r4NKKiWHJwGxBMwomarSEt9Pr5fwEI_dPaX27wSQ
.google.com TRUE    /   FALSE   0   APISID  Py_WwXqgR7fa7RBeY/ASRXSmnMAGWYP-fesUq
.google.com TRUE    /   TRUE    0   SAPISID _FcGfSR_PII9LYQvUa/AdsSewK7WmKEzKGNmc

Well, even if Google was vulnerable to XSS, this still wouldn't be a breach.

Why? Because of the HTTPOnly flag. It is the big reason for XSS's downfall.

You can say there are two kinds of cookies:

those that your browser gets when it recieves an HTTP response from a remote server (like google.com). They are in the Set-Cookie part of the response.
cookies set by JavaScript dynamically after you've opened the webpage, which can then be read by your browser.

What's the HTTPOnly flag? It is a flag on a cookie which means that it strictly falls into the first category only, and not the second. I.e. HTTPOnly cookies can be read by the browser only as part of the HTTP response, JavaScript has no access to them.

That is why, when you use document.cookie, be it an XSS scenario or not, you only get the not-HTTPOnly cookies. There is usually nothing important stored in these; all adequate and security-savvy webmasters keep the session cookies as HTTPOnly.


WiFi security from another authorized user (roommate) I believe we use WPA or WPA2 encryption.

To what extent can another user monitor my traffic?

Monitor my desktop activity?
View documents I've saved on my computer?
Tell what sites i visit?
Tell what my passwords / logins / email addresses are?

Is there any way I can tell if I'm being monitored? If so, how can I stop it?

You can be monitored when you are on the same wifi network and the other person uses a wifi antenna that is in promiscuous mode. He can only see what traffic you are sending over the wifi network. If you are sending your journal over the internet without using HTTPS, he will be able to see them.

Your internet can be actively monitored, at least where you are going. There are countermeasures like using an encrypted VPN or SOCKS proxy.

Again for your passwords, if you are visiting the site in HTTP rather than in HTTPS, than anyone that has access to a point between you and the webserver will be able to see your credentials.

Solutions:

get your own wifi
invest in an encrypted vpn
invest in a SOCKS proxy server
Use HTTPS

P.S. This is the same for Mac and PC.


Car registration paper stolen from glovebox, what kind of scams are possible? I carelessly left my car unlocked, and it was searched by trespassers in the night.  They only took the registration and insurance card (Ohio, United States).  This seems strange to me, as these things aren't really useful to anyone, except possible for the personal info they contain, although I don't think it's enough info to take over online accounts or to impersonate me in person.  Strangely, they didn't take low stakes items like change, or high value items like a dash cam and expensive sunglasses, or even the actual plates, which would have been useful along with the registration.

What should I be worried about as a result of this info leak?

You asked,

  What should I be worried about as a result of this info leak?

It's hard to give an exhaustive list, but in the end, I don't think that's really the important question to ask - really, the important question is, what should you do now to protect yourself?

Reach out to the DMV and your insurer. Your state's DMV will have a process on how to replace stolen registration documents. The risk of not reporting them as stolen is that the thief may try to impersonate you with respect to your motor vehicle ownership (i.e. they may try to create an online account with the state DMV, or take over your existing account. Or they may try to get replacement plates and impersonate your vehicle, etc).
Ask the major credit bureaus to lock your credit report. This will mean a minor hassle for you if you try to apply for credit any time soon, but it can help protect you from identity theft. The thieves now have your name and address and details about a vehicle you own - while that by itself isn't very powerful information, it may form a piece in a larger puzzle - taking steps to protect your identity can help prevent that.


Best practice for home router configuration Having read about the large number of routers infected by Wifatch, I've realised I don't know how to check whether my router has been infected with this or more malicious malware or what I'd do about it.

Besides changing the default password and checking whether the firmware needs updating for security reasons, what important things should everyone do to secure their router and how could you test that security? Is it simply a case of relying on manufacturers to provide firmware patches for any issues?

I have a Billion Bipac 7800N router, but I'm interested in advice that would also benefit friends and family with different devices, as I'm their de-facto security "expert"!

I always do the following for my home gateway (router + modem) or router (if separate, although I haven't seen a modem that doesn't also include a router in at least a decade):

Change administrative password, you can write it on a piece of paper taped to the gateway.
Set security settings to highest level. Usually, this means turning off all external ports and external administration. Why would you want this?
From your LAN, visit www.grc.com and run their IP scanning test. Look for any problems and reconfigure to correct them.
Turn on logging and monitor it from time to time. Watch China, Russia and bot nets regularly knock on your front door.
Kill anything that does pass through from outside to inside unless you really need it, and then consider carefully if you really need it.
If you're running a server, use a DMZ and isolate from your internal LAN. Turn on pass through ports to DMZ server only as needed. If you can't DMZ or run the server there, pass through ports or, consider a simpler proxy server in a DMZ that can handle all incoming connections and check for validity, consistency, security and forwards to internal systems.
Access to your LAN from outside should be by VPN (preferred), ssh (adequate) or both (belt and suspenders).

Assume any port you leave open to the world has a very high likelihood of being compromised, and thereby compromising your LAN. Again, do you really need an open port (unless VPN)?


Can I exploit Windows kernel from user-mode application? In this document is detailed technique of exploiting Windows kernel. But writer is talking about accessing kernel memory & doing exploit from user-mode application at the same time. Can I do this from user-mode application, or do I need to do it from driver? Thanks.

You need admin rights to normally get code into the kernel, and code is usually executed by a driver. Code in user mode cannot by design execute in kernel, so you have to find a bypass vulnerability to get past the user-mode barrier. If you can find such a vulnerability you can execute from user mode.

Other attack vectors are to find an EOP vulnerability, elevate to admin, and install a malicious driver.


Valid Characters For Magnetic stripe We bought some Magnetic stripe cards and I'm writing a program that will get talked to by a mag card reader. What I need help with is that I can't, for the life of me, find out what characters are valid on track 1,2, and 3. I have my program working, but I would like to have the program raise red flags if someone tries sending it data that wouldnt be able to come from a mag stripe.

Question W/O background: What characters can be encoded on T1,T2,T3 of a mag stripe card? Sources please!

These are the valid range for standard encoding of track 2, which is the ABA standard: 0x30 to 0x3f in the ASCII character set

0 1 2 3 4 5 6 7 8 9 : ; < = > ?

Sources:

http://blog.tehinterweb.com/?p=60

With enough control over the reader/writer, you can encode bits in anyway you choose though, could make up any system you like.


Question on MAC(Message Authentication code)? I am new to Cryptography and unable to understand clearly about MAC concept.
As per MAC concept, Sender 'A' will encrypt the original message with symmetric key to create MAC1 value and then will send the original message and MAC1 value to the receiver 'B'. Now, 'B' will encrypt the original message with same symmetric key to create MAC2 value.

If MAC1=MAC2, then message integrity is achieved.

I just want to understand why do the sender send original text in plain format?
This would also attract eavesdrops to capture the message?

Please correct me if my understanding in wrong.

You are correct that by only using a MAC, an eavesdropper can read the message.  This is because a MAC is designed, as you note, to protect message integrity, (as well as origin authenticity, hence the "authentication" bit of "message authentication code) not message confidentiality.   If we want confidentiality, we use encryption instead.  If we want (as we generally do) both confidentiality and integrity, we combine encryption and a MAC, using both.

If you were to use only a MAC, this is because the data is not secret.  You don't care if it can be examined, only that it cannot be modified.

Just to note there are several ways to use a MAC in addition to encryption.  You can MAC then (or and) encrypt, where the MAC is over the plaintext message, but modern cryptographic thought holds that this is inferior to encrypting first, and then MAC'ing the ciphertext and IV or nonce to ensure the integrity of the ciphertext.


DNS: Conditional Forwarding I'm currently attempting to track down a problem with a Websense Web Filter breaking SSL connections for sites in a conditional forward. To do this, I need to know exactly how a conditional forward works.

How its been explained so far is that a request is made of my company's DNS from a host within the private network. The company's DNS does not know the IP of address but knows what DNS server does, it then queries Company B's DNS server for their internal IP for this site. When Company B's DNS responds, our DNS relays the information and a VPN session is established at the firewall to this site.

How its happening for SSL/HTTPS requests is that, the host is making that same request but instead we are receiving a "The DNS server could not resolve host" error message back. When the station or address is removed from WCCP via access-lists on the firewall, the host is then able to access the site as normal.

So TL;DR, I need to understand how conditional forwarding works to connect hosts via VPN to another's private network.

A conditional forward is SPECIFIC to a domain being queried at the end of the day.  Let's model this:

YOUR COMPANY
yourco.com
finance.yourco.com
mrkting.yourco.com

Internet
yahoo.com
google.com
blogger.com

Internet.Misc
login.yahoo.com

We have your company three websites, and a specific Yahoo site. When a machine makes a query from say your network:

john.yourco.com --> whois finance.yourco.com --> your DNS server

It's best this query be handled internally by your DNS servers. This minimizes any kind of leakage. You wouldn't want anyone on the outside to be able to even know about the internal design of your network, e.g.: prototypes-of-new-revunue-generation.yourco.com

Now, when someone in your network visits say Google, Blogger, Yahoo, initially they'll query your DNS server:

john.yourco.com --> whois google.com --> your DNS server

In the event your DNS server doesn't see it right away, it will make this query to the root servers. There is no mechanism to control what/who sees what coming from you. Now imagine the following:

john-remote.house.com --> find: prototypes-of-new-revunue-generation.yourco.com --> DNS

You would not want this traversing through the Internet so you shove it into a conditional forward. Pseudocode:

if usersearch == specific_to_me
    then
       send him to this server ALL THE TIME
    else
       let him query root servers
fi

It can also reduce the amount of traffic coming in and out of your network. This coupled with the fact that, you can ensure no one has hijacked your DNS server to re-route, etc.

http://skibbz.com/how-forwarder-resolves-queries-between-internal-and-external-dns-server/
http://technet.microsoft.com/en-us/library/cc782142%28v=ws.10%29.aspx
http://technet.microsoft.com/en-us/library/cc757172%28v=ws.10%29.aspx


sandboxing IoCs and signatures Sandboxes are used for automated extraction of indicators of compromise (IoCs) that can be used to write signatures. Can this signature then be used, for example, on an IPS system to block certain actions?

IOCs are breadcrumbs attackers leave and organizations gather up to share with each other. There are atomic indicators in an IOC like IP, port #, username, filename, etc that you can configure your IPS to reject.

There are host-based or network-based indicators. Because of all the types of IoCs, your IPS won't be the only tool you use to guard against attacks, though a good one of course.

This article from FireEye on OpenIOC will help anyone who wants to better wrap their mind around the types and parts of an IOC, using this framework as a specific example.


How do I get unique users signed up? [Canada or US] Clients can win prizes on service and our team has to check their identity before giving prizes to them. Is there any way to collect photo ID while people signing up? Is it legal? Or there is some other way to check that it is not the same person signed up twice?

"Welcome to the Internet, where no one knows that you're a dog."

You cannot rely on any info supplied by a user to be globally unique in identifying themselves.

Any process you can devise can be manipulated. Even if you collected passport page photos, you would still not be able to confirm that every winner was unique. For example, my wife has a passport from one country with her maiden name, and a passport from another country with her married name. There are also online fake ID generators for just about any country you would like.

Instead, you have to design the process:

to be more expensive to manipulate the process than the prize is worth (e.g. have a proof of purchase tied to a specific account)
to be tied to a long-term proof of relationship or activity (certain amount of reputation points in your system, depth or complexity of history on a social network)

If you cannot do these things, or if they are contrary to your goals for having a prize, then you need to not care if someone was able to win multiple times, or gain enough benefit from someone winning, even if someone wins multiple times.

For example, in order to win (or claim their prize), they have to advertise you on their social network. Even if someone won 100 times, that would mean that they would have to have 100 accounts and have all of them advertising for you. That's not such a bad thing.


Confusion regarding PCI compliance in an office We use myvirtualmerchant.com (previously Converge, owned by Elavon) to process payments in our doctor's office.

Recently, they emailed us that we have to fulfill their partner company's (Trustwave TrustKeeper) list of PCI requisites, or else suffer hefty fees. This is what a first scan shows of our Office IP:

Image of Compliance Violations http://tonsofbugs.com/zss/2015-06-04T1419.jpg

We have a new modem supplied by Comcast.

The confusion that I'm having is in trying to understand why any of this falls on us?

Do people come into your office and pay you using credit cards?  If so, that's why it's falling on you:

  PCI DSS applies to all entities involved in payment card
  processing—including merchants, processors, financial institutions,
  and service providers, as well as all other entities that store,
  process, or transmit cardholder data and/or sensitive authentication
  data.

The question then is not "why is this falling on you" but "why is this falling on you now?"  Most likely they've been scanning your IP address space all along, and when  you spun up your "new modem supplied by Comcast" it lit up your scan results with discouraged TLS versions and weak encryption ciphers.  And those things need to be addressed for DSS compliance.


Found fake Facebook profile with my name and education history, what to do? A family member of mine called my attention to a Facebook profile with data significantly resembling mine:

Matching first and last name

Matching city

Matching secondary school

Matching university

Different workplace (although same industry)

4 profile photos showing someone else (safe-for-work but a bit dating-site-style photos)

The profile dates back to 2019, has about a dozen generic posts (most of them with 20-30 likes) and a single comment from another user (whose profile also dates back to 2019).
I am not a journalist, politician or any other high-profile person. I live in a relatively large city, but the rest of the matching data can hardly be a coincidence. I have a rare name, I only know of 3 people worldwide with the same name, and we all have widely different occupations, education history and place of living.
I would like to know:

What may be the intentions of the creators of the fake profile?

What actions should I take?

What I have done so far

I saved a copy of the fake profile page and photos in case in the future they take them down but I need to present them as evidence for any reason.

I reactivated my Facebook account (that I previously deactivated several years ago) to make sure I still have access to it and thereby exclude the possibility that it was taken over and repurposed as the fake profile. While being there, I set a new password and added a second-factor auth (it was not an option back then), then deactivated the account again.

I removed my profile photos from various web sites to make it a little harder to find a photo of me which could be misused on the fake profile, making it even more convincing.

I did a reverse image search of the fake profile picture on the internet. I found a profile on vk.com with the same image but a different name and even different nationality. This could be a fake profile as well or a real profile with the original source of the images (although the person's age does not seem to match the photos, so probably fake as well). I saved this too.

I reported the fake profile to Facebook as "pretending to be me". I got the answer "we reviewed the profile you reported and found that it doesn't go against our Community Standards."

One reason scammers may do this is to gain trust with and get close to other people so they can then scam then. Once the scammer is trusted, people who know you are more likely to divulge their own information to them, or more trivially, click on links that they think you are sending to them. There's probably a lot of other things they could try to use the identity for, but it would just be speculation to guess further.
If this is the case, your course of action should be to simply report the profile as fake to Facebook, and possibly encourage others to do the same, as more reports will make it more likely to come under investigation.
Alternatively, it could really be a coincidence. Even if you have a rare name, it's possible that you don't know everyone else with the same name.
Things like this could almost justify keeping a real placeholder Facebook account active but with privacy settings maxed out, so at least your friends know which is your real profile.


Auditing Event Logs of a System Soon I will be acquiring the event logs of the systems my company produces and expected to audit them. Multiple logs are generated from each computer and there are multiple operating systems to audit. The systems are isolated from the internet and have a significant amount of physical security, not to mention there isn't a whole lot of conventionally useful data to obtain from them anyway. Am I wrong to feel it is unreasonable and unproductive to be examining these logs? I am under the impression that any potentially malicious activity isn't necessarily going to be obvious just by looking at the logs, if it can even be detected at all. Since it seems I can be on the hook if an unreported incident was discovered, how can I possibly analyze the overwhelming amount of information headed my way without changing my job title to 'Event Log Reader'? Does software exist that can help?

A lot of software exists for this reason. And some of it can be managed by a single person, or a whole team of people. The main principle about this is:

Identify what you will be logging.
Identify what type of information you need (operational or security)
Identify use cases; malicious user logs in, someone logs in at odd hours, someone who isn't supposed to allowed logs in.
Identify with the given infrastructure how to collect these events.
Create the alerts, plug in your email, and wait until something happens.

This type of tool that you are looking for is for Information Security purposes, although other tools of the opertaional standpoint have started to create themselves as SIEM operators. What is a SIEM? (thanks to wiki)

  Security information and event management (SIEM) is a term for software and products services combining security information management (SIM) and security event management (SEM). SIEM technology provides real-time analysis of security alerts generated by network hardware and applications.

I am not affiliated with any of these development of these tools, nor do I work for any of the companies that sell them (although I do work WITH the tools themselves).

I am going to break this down as a cost basis. From Free(ish) to Expensive, and also give you some information on identifying the type of information you are looking for within them. These will allow you to put all the data within one place and receive an email when something occurs rather then reading Event Log all day (BLEH!).

OSSIM

  OSSIM provides all of the features that a security professional needs
  from a SIEM offering – event collection, normalization, and
  correlation. Established and launched by security engineers out of
  necessity, OSSIM was created with an understanding of the reality many
  security professionals face: a SIEM is useless without the basic
  security controls necessary for security visibility.

This product provides a good foundation with the ability to receive Event Log, Syslog, and other types of events, create rules, and receive alerts when something happens that you didn't want to. This is free, and coupled with there Threat Intelligence data.

Splunk
https://www.splunk.com/view/it-security/SP-CAAAAKD

This is an operational software gone security. It does some of the more basic features of correlation, the rules are easy to make and it looks flashy. It's easy to use and easy to setup. A lot of people use this free version although alerting is lacking in the free version.

Nitro (McAfee)

This is one of the expensive ones that will require 8-10 months of configuration and build out time to make it manageable by a single user.

ArcSight (HP)

The bohemouth that is HP's ArcSight, as beautiful and amazing as it is, it requires a lot of working to keep it running. Although it is one of the best products out there, its really expensive and likely not worth the purchase for your use case.

--
So I hope this helps you identify that it isn't difficult to configure something like this and just wait around for emails about alerts.


Cybersecurity "Airport model" For the last few months, I have heard about a next generation model of Cybersecurity called the "Airport model."

Does anyone have more information about it?

The Airport model is a concept where the network infrastructure is split up to different zones secured with different levels of security that share information between the zones. Airport security is very similar and thus the name.

Just like in an Airport there is a "control tower" that is in charge of detecting any anomalies or incidents in the network. This "control tower" is usually placed in the SOC(Security Operations Center) team or under the CERT(Computer Emergency Response Team).

You can view a diagram of the model here in page 2 paragraph 1.2.


Question on SNORT Rule I am new to SNORT and can not figure out what the following rule means:

alert tcp $EXTERNAL_NET any-> $HOME_NET any (msg:"SCAN FIN"; flags: F;
reference:arachnids,27;

That looks to me like it would alert if it receives traffic from the defined external network ($EXTERNAL_NET) to your defined home network ($HOME_NET) where the TCP fin flag is set on it's own.

This could be taken to indicate a piece of scanning software, as in a standard TCP communication FIN isn't sent on it's own, it goes along with an ACK flack (there's more information here)


Will OpenSSL's TLS-SRP still provide PFS if all credentials are public? The obvious go-to for PFS is DHE (or ECDHE).

But I'm wondering if using tls-srp but with fixed (and therefore can be considered publicly known) credentials can achieve PFS as well. I suspect this is the case, since one of the features of SRP is that you cannot re-compute the session key even if you know the secret.

Background info:

I'm working on server and client code using OpenSSL.
It already uses tls-srp for its intended purpose: establishing an encrypted channel after authentication.
There's now a requirement for an additional PFS only channel, where we explicitly do not want authentication, we just need the encrypted data for each session to be protected.

We could go with DHE, but it would be simpler if we could just re-use tls-srp, but with fixed credentials to bypass the authentication. We control both server and client, we don't have to worry about third party, so there's no problem there. By not going with DHE I believe we also don't have to worry about certificates.

Please let me know if this is not a good idea. Any comments welcome. Thank you very much.

This is not a good idea. But that's not a problem of SRP.

SRP is a Password-Authenticated Key Exchange protocol by which two parties establish a shared secret with mutual authentication through another shared secret. The beauty of the thing is that the initial shared secret may be weak (i.e. a password that human users can remember), and yet the new shared secret is not susceptible to offline dictionary attacks.

A dictionary attack is a brute force attack on a human-compatible secret. The attacker tries "potential passwords" until the right one is found. An offline dictionary attack is a dictionary attack where the attacker has obtained enough information to test passwords at home, without interacting any further with the target systems; e.g., if the attacker has a hash of the password, then he can try passwords by hashing them and comparing with the known hash value. Offline dictionary attacks are powerful because nothing prevents the attacker from throwing more power at the task, through dedicated hardware (GPU, FPGA, ASIC...), rented systems (commercial clouds), or even "borrowed power" (idle machines in a University network, botnets...).

A contrario, if an offline dictionary attack is not possible, then the attacker must use an online dictionary attack, and then things begin to look better because the honest systems can limit the rate at which they respond, or even stop responding after too many failure. This is the behaviour of a smart card with a PIN: after a few wrong PIN, it just locks itself.

The whole point of PAKE is to avoid offline dictionary attacks. Attackers MUST talk with either the genuine client or the genuine server whenever they want to test a potential password. This has a few consequences for your case:

PAKE protocols, in particular SRP, naturally provide forward secrecy (also known as PFS). Forward secrecy is about preserving confidentiality of past communications even against attackers who later on manage to steal long-term stored secret values of either or both parties. In the case of TLS-SRP, the only long-term stored secret value is the shared password.

Suppose that there is a procedure P by which an attacker, after having recorded (passively) a connection, and having later on stolen the shared secret (the password x), can unravel the contents of the connection. Forward secrecy is achieved if such a procedure P does not exist. However, if P exists, then the attacker can turn it into an offline dictionary attack: the attacker just has to "guess" the password x, and try procedure P using that guessed value of x. If it works, then the guessed password x was correct.

In other words, if a PAKE protocol does not provide forward secrecy, then, mechanically, it does not provide protection against offline dictionary attacks either, so it is not a "true" PAKE protocol. Conversely, good PAKE protocols like SRP necessarily provide forward secrecy.
The explanation above naturally extends to the case of a public password. A public password is just a password for which dictionary attacks are really efficient (attackers get it right on first try...). Thus, you still get forward secrecy even if the password is known to everybody.
However, all of this relies on important details. The "forward secrecy" property is about an attacker who passively recorded a connection, and tries to decrypt it afterwards. In particular, it says nothing about active attackers.

If the password is known to everybody, then the attacker may pose as a fake server, or a fake client, or both at the same time; notably, the attacker may run a Man-in-the-Middle attack. Such an active attacker can then intercept connections and see all the data as it flows. Since the MitM still forwards data both ways, the genuine clients and servers will be none the wiser.

This explains why I used emphasis on the "mutual" word at the start of this answer. When you say:

  we explicitly do not want authentication, we just need the encrypted data for each session to be protected

then this is a kind of contradiction in terms. What you really mean is either of the following:

you do not want client authentication (but the client must still have some guarantee that it talks to the right server);
your usage context is such that attackers cannot be active.

Passive-only attacker contexts are, in fact, extremely rare, and most people who just assume that attackers can not alter data in transit are merely delusional, and primed for a rude awakening at some point. So we are back to point 1: the client should still be able to know whether it talks to the right server. In SRP, the shared password is the basis for mutual authentication. By making it public, you remove authentication in both directions, and that's too much removal.

There cannot be any notion of authentication if everything is known to everybody. But SRP is based on the idea that the only secret is the shared password. So you cannot get server authentication if that only secret is not, in fact, secret.

If you want an "unauthenticated" communication (server does not know who the client is; but the client still knows who the server is), then SRP is not the way to go. Rather, you will have to use the "normal" SSL/TLS in which the server has a public/private key pair, and the client knows the public key, or learns it dynamically through the server's certificate (the latter implies certificate validation, which is what Web browsers do, but maybe you would have preferred to avoid certificates altogether).

Summary: yes, SRP provides forward secrecy, even if the password is public. But no, this is not a good idea, because forward secrecy is not the only thing you really want; you also need normal secrecy, and that one cannot be maintained against active attackers if you use SRP with a public password.


How could one defeat Webtrackers I was just wondering why some pages refuse to load completely while surfing with no-script Plug-in when I don’t allow specific Java scripts. I was wondering if there is some way to hold the tracker scripts blocked without resulting in broken web pages. So I tried some other "don't track" plug-ins and tried to find some knowledge. Most of the "don't track" plugins make some pages not work. So I was wondering how one could defeat such trackers like googleanalytics or piwik or such. I was just wondering for Privacy reasons.

The Evercookie is able to track users using 15 different methods, and if parts are removed then it automatically recreates the missing data. Edward Snowden cited it as a method effectively used to track the otherwise untrackable TOR users. You could theoretically make a new virtual machine for each browsing session and delete it when done, but you'll still have to mask your IP address and prune your user-agent string to keep from potentially being recognized from your previous visits.

Practically, you need to balance your desire to browse a specific wab page against your desire to remain untracked. There's no way to automatically determine which parts of the JavaScript (not Java scripts) are being used for tracking and which are for functionality; you'd have to open each script and determine it manually for every page you visit. You can do a lot by disabling cookies by default, disabling scripts by default, and setting plugins as click-to-run, but you cannot get around the fact that many sites today force you to allow them to track you in order to access their content.

If you're blocking scripts by default, keeping googleanalytics scripts and cookies blocked (and, obviously, not signing into your google account) will generally be enough to stop google from tracking you. I don't have any experience with piwik, so I can't speak to that.


Personal Cloud Storage vs. File Sharing Services In terms of maintaining Confidentiality, Integrity, and Availability, what are the risks and benefits associated with setting up a personal cloud storage device on your home network versus using a file sharing service (Dropbox, for example).

If one has a lot of files (in the hundreds of GBs) in would seem more economical to have a personal drive attached to your home network, which you could still route to over the internet and access just as you would a file sharing service.

It's obvious that file sharing services wins in terms of availability, what what about confidentiality and integrity?

The question basically boils down to: Is my privacy and my data more or less secure by using a 3rd party file storage solution, or my own hardware/security mechanisms for cloud storage?

A lot depends on how good you setup and secure you personal cloud storage.
The risk you have when running one on your home-network is that potential malware could more easily spread to your storage. And your storage could cause vulnerabilities to attack your home-network. However, if you secure it well, or even ran it on a separate network these problems can be fixed.

When talking about integrity and confidentiality, home-network will win for sure. You shouldn't be trusting big companies with sensitive/personal data. There are services offering a secure and privacy-respecting cloud-storage, but yet, your own files hosted on your own device is of course better.
If you're able to secure that device against others.

Another thing you could (should) do, is encrypting your files before uploading them to the cloud. Yet, would you give your most precious possession to a company, even when you've putted it in a 'safe'? Ain't it sometimes better to keep the safe at home? Otherwise the company could still be trying to crack your safe without you knowing.

And indeed, when you want to host loads of files your own cloud storage can be more economical depending on electricity costs etc.

Reliability? Depends. Those official services can offer up-time insurances you cannot. On the other hand, when your network is down you could eventually dial home and ask the person there what's wrong and instruct him to fix the problem. Google won't appreciate it when you dial them to give instructions.

tl;dr: I'd go for a home-based personal storage. But rather on a separated network and well secured.


Trusted hardware password manager I feel like I have a very common problem. I have too many passwords to remember, as well as PINs for credit/debit cards, access codes for doors at my workplace or combination locks. I don't seem to be able to remember all of them no matter how hard I try, and not remembering any of those at the time that I need to can be inconvenient.

I am looking for a way to securely store passwords and PINs. The method should be

secure against compromised websites, i.e. if someone breaks the database of site A and manages to obtain my password for A in plaintext, he should not get any information about my password for site B
secure against a compromised local machine, i.e. if someone installs malware on my laptop he should still be unable to get my PIN codes and other passwords that are not used on the compromised machine
secure against theft, i.e. the method should not involve a physical token that, if it gets stolen, will allow a thief to empty all my accounts.
portable, i.e. it should work without me sitting in front of my computer, for example at an ATM or when paying in a shop.
secure against data loss, i.e. I want to be able to make backups in case of device failure, theft, etc.

That rules out a few approaches that I am aware of and that have been previously discussed:

reusing passwords is against (1)
writing down passwords on a sheet of paper is against (3) and (5)
password manager in my computer (online or offline) is against (4) and (2)
generate passwords in my head is against (1) and (2) unless the method itself is secure. Otherwise this is essentially security through obscurity and can only work as long as not too many use the same method.
a physical token that contains lots of characters to "generate" passwords by choosing a different starting point or pattern to pick letters from that token. There is a problem with rule (3) if the method is known or too simple, or (1) and (2) if the method is simple and the token happens to be a book or something else widely known. Again, it smells like security through obscurity. In addition, it is hard to backup securely (5).
encrypting data on a sheet of paper and decrypt it manually is either using an insecure method, or sounds like something that I can't do in my head (I am happy if somebody corrects me on this one). Note that even doing it on paper is not a good idea in a supermarket if that means that I have to securely destroy the paper on which I worked out my PIN after each use.

My question is therefore: Is there any way to store/memorize passwords that satisfies the above requirements? One possibility that comes to my mind is a dedicated device that can perform AES decryption, so I could store passwords that were encrypted with a master password on my smartphone, and then use that dedicated device to obtain a plaintext password by entering the encrypted password and the master password. I would be particularly interested in a method that I can use without any tools, or using portable devices that I can buy easily/cheaply on the open market, as long as I can be reasonably sure that the device does not reveal my passwords. Of course it would be great if the method was easy and quick to use.

I don't consider myself a high profile target, so I am willing to assume that I could buy something like a pocket calculator on Amazon without somebody fitting a hidden GSM module in it. I am however not willing to assume that a given smartphone or computer does not have a trojan horse installed.

I think that you are over-thinking things! Also, you are not being realistic about the risks.

Also remember that any password is "security through obscurity" so it isn't always the "bad boy" it is made out to be.

So, a sensible approach might be a hybrid.

Low sensitivity logins - use a password manager. Most have various protections to help reduce the risk of malware hijacking data. Many also have 2-factor authentication capabilities which mitigate many issues. Examples: forums.
Medium sensitivity logins - use the password manager for convenience but add 2-factor authentication for security. Typically using your phone or some other hardware device such as a token. Soft tokens like Google Authenticator can be good as they are not totally dependent on one piece of hardware. Examples: social media.
High sensitivity logins - Store part of the password in your password manager and use a pattern to keep the rest in your head but still make it unique for each site! Also use 2-factor auth if available. Example: banking and finance

There are certainly many more ways to cut this. The main thing is to think about the risks sensibly and don't make life hell just to try and deal with a risk that is tiny or indeed an impact that would be tiny.


Is it a security risk if the user enters html characters in a textbox and they're reflected on the next page in a website? (not script tags) In my website I have a textbox where the user can enter whatever they want and the text is printed out on the next page. For certain cases, they can type HTML tags to format their message so that in the next page of the website things can be bolded, in a list, italicized, etc, but script tags are not allowed due to XSS vulnerabilities.

Right now I allow the  tag to be reflected, so I can type into the textbox sample_link and on the next page if the user clicks on the text sample_link, they will be redirected to google.ca.

I have been reading up on whether you can get a virus from just visiting a website, and based on this answer here: Can you get virus just by visiting a website in Chrome? and many others, it seems you can. So say that the user didn't put google.ca, and instead some malicious url, then if they click that link their computer can get infected or some other attack may take place.

What I want to know is whether this is really an issue, since right now it seems like the only way for this to be a problem is if the user themselves enter this malicious link and click on it. So is there a way for an attacker to capitalize on the fact that this  tag is being reflected? I guess one way is that if what someone enters in a textbox gets reflected in a page that everyone can see, then other users may click this link, but that would mean sites like stackoverflow and other forums would be "unsafe".

It would be great if someone could shed some light on this situation. Thanks in advance!

Edit:

I have a whitelisted set of tags that are allowed to be reflected. Here they are:

"a", "b", "blockquote", "br", "cite", "code", "dd", "dl", "dt", "em", "i", "li", "ol", "p", "pre", "q", "small", "span", "strike", "strong", "sub", "sup", "u", "ul"

things can be bolded, in a list, italicized, etc, but script tags are not allowed due to XSS vulnerabilities.

That's not enough, your site is still vulnerable to XSS.

Here are some XSS examples that don't require


Flaw in HTTP Digest Authentication I am working through my textbook and I came across this question:

Below is the message format for a browser response to access a password-protected web page using HTTP digest authentication.

GET URI HTTP/1.1
Host: URL
...
Authorization: Digest username="UserName", realm="Realm", nonce="Nonce",
uri="URI", algorithm=MD5, response="Response", qop=QoP, nc=NonceCount,
cnonce="ClientNonce"

How will the server validate this response?

I came up with this scheme:

    1. Use UserName and Realm to retrieve D1 =
       md5sum(Username:Realm:Password) from the password file.

    2. Compute D2 = md5sum(GET:URI).

    3. Compute r = md5sum(D1 : Nonce:NonceCount:ClientNonce:QoP:D2).

    4. If r == Response, authentication succeeds and return the content of
       URI; otherwise authentication fails and return an error code.

Is this correct or are there any flaws in my method?

The only thing I can think of is that a Man in the Middle attacker could tell clients to use basic access authentication because digest authentication provides no mechanism for clients to verify the server's identity. It may also be vulnerable to replay attacks, i.e., if the client can replay the message digest created by the encryption, the server will allow access to the client.

I came up with this scheme:

Digest authentication is defined in RFC 2617 so please refer to this documentation instead of coming up with your own scheme.

  It may also be vulnerable to replay attacks...

The nonce set by the server is used to defend against replay attacks, i.e. only replies are accepted which match the unpredictable nonce.

  What could the flaws be then? I am not confident that the scheme that I used is flawless.

While Digest solves the problem of authenticating the client over an insecure channel it makes it necessary to store the passwords at the server in plain or in some equivalent form in order to verify the data sent by the client. This shifts the vulnerability problem from the data transport to the server. And in effect it enables an attacker to not compromise a single account but zillions at once.

Which means you should better use TLS to secure the channel and keep the password stored in a secure in irreversible form, so that an attacker cannot compromise accounts easily and en mass. Additionally this solves the problem of missing identification of the server.


Clamscan: infected files found From time to time, I perform a scan with clamscan. I'm on Archlinux. Clamscan database is updated before each scan.

Today clasmscan reported 19 infected files:

./.cache/mozilla/firefox/qyq0onej.default/cache2/entries/3BCF117A4E950F91D6EB45E1DEDD93D42A0F4084: Sanesecurity.Malware.20387.WebHeur.UNOFFICIAL FOUND
./.cache/mozilla/firefox/6vjpuub7.default/OfflineCache/D/3/714AAA0A2A5929-0: Sanesecurity.Malware.26368.JsHeur.UNOFFICIAL FOUND
./.cache/mozilla/firefox/6vjpuub7.default/OfflineCache/3/F/14B2B08E604FDC-0: Sanesecurity.Malware.26368.JsHeur.UNOFFICIAL FOUND
./.cache/mozilla/firefox/6vjpuub7.default/OfflineCache/C/3/725565E485B3A3-0: Sanesecurity.Malware.26368.JsHeur.UNOFFICIAL FOUND
./.cache/mozilla/firefox/6vjpuub7.default/cache2/entries/E760C5B03F1F86762A3BA2E7263CE8952C042185: PhishTank.Phishing.4401799.UNOFFICIAL FOUND
./.cache/mozilla/firefox/6vjpuub7.default/cache2/entries/047AD2F458E28F8B0EDD2895F5AC550333CEF02D: PhishTank.Phishing.4401799.UNOFFICIAL FOUND
./.cache/mozilla/firefox/2vye4yjm.test/OfflineCache/D/3/714AAA0A2A5929-1: Sanesecurity.Malware.26368.JsHeur.UNOFFICIAL FOUND
./.cache/mozilla/firefox/2vye4yjm.test/OfflineCache/3/F/14B2B08E604FDC-1: Sanesecurity.Malware.26368.JsHeur.UNOFFICIAL FOUND
./.cache/mozilla/firefox/2vye4yjm.test/OfflineCache/C/3/725565E485B3A3-1: Sanesecurity.Malware.26368.JsHeur.UNOFFICIAL FOUND
./.cache/mozilla/firefox/2vye4yjm.test/cache2/entries/E760C5B03F1F86762A3BA2E7263CE8952C042185: PhishTank.Phishing.4401799.UNOFFICIAL FOUND
./.cache/mozilla/firefox/2vye4yjm.test/cache2/entries/75C1F044F894D98DA12F8CA2CFEB25A27917E6A2: Sanesecurity.Malware.26345.JsHeur.UNOFFICIAL FOUND
./.cache/mozilla/firefox/2vye4yjm.test/cache2/entries/7AA49C7707663F1786152490B004C44E7CAAABC4: PhishTank.Phishing.4401799.UNOFFICIAL FOUND
./.mozilla/firefox/6vjpuub7.default/extensions/uBlock0@raymondhill.net.xpi: PhishTank.Phishing.4401799.UNOFFICIAL FOUND
./.mozilla/firefox/2vye4yjm.test/extensions/uBlock0@raymondhill.net.xpi: PhishTank.Phishing.4401799.UNOFFICIAL FOUND
./.config/Franz/Partitions/whatsapp_9a7f0132-4d66-7676-1018-a78cd6887824/Cache/f_000045: Html.Exploit.CVE_2017_8738-6336184-2 FOUND
./.config/Dagom'App/app.zip: Sanesecurity.Foxhole.Zip_Js_Js.UNOFFICIAL FOUND
./.wine/drive_c/windows/syswow64/gecko/2.47/wine_gecko/browser/omni.ja: Sanesecurity.Foxhole.Zip_Js_Js.UNOFFICIAL FOUND
./.wine/drive_c/windows/system32/gecko/2.47/wine_gecko/browser/omni.ja: Sanesecurity.Foxhole.Zip_Js_Js.UNOFFICIAL FOUND
./.local/share/virtualenvs/cad/lib/python3.6/site-packages/PyQt5/Qt/resources/qtwebengine_devtools_resources.pak: Sanesecurity.Malware.26345.JsHeur.UNOFFICIAL FOUND

Some infected files seem to be in firefox's cache (ex: Sanesecurity.Malware.26368.JsHeur.UNOFFICIAL).

One seems to be related to Franz (a client for several messaging services): Html.Exploit.CVE_2017_8738-6336184-2. This one seems to be an official found.

./.config/Dagom'App/app.zip: Sanesecurity.Foxhole.Zip_Js_Js.UNOFFICIAL FOUND

This one seems to be a false positive.

./.wine/drive_c/windows/syswow64/gecko/2.47/wine_gecko/browser/omni.ja: Sanesecurity.Foxhole.Zip_Js_Js.UNOFFICIAL FOUND

I don't know what to think about this one.

./.local/share/virtualenvs/cad/lib/python3.6/site-packages/PyQt5/Qt/resources/qtwebengine_devtools_resources.pak: Sanesecurity.Malware.26345.JsHeur.UNOFFICIAL FOUND

And this one seems to be a false positive as well. I installed PyQt with pip, for python development.

I haven't much experience with clamscan, or malware. Could you explain to me how I should consider this information?

When the match is unofficial, how relevant is the information?
Are these files all malware?
If one or several of them are, what should I do with them?

When the match is unofficial, how relevant is the information ?

To cite from Sanesecurity: False Positives:

  UNOFFICIAL means that the signature is not an Official ClamAV signature and therefore you need to contact one of the following people when you have a problem:...

  Are these files all malware?

About Sanesecurity.Foxhole.Zip_Js_Js.UNOFFICIAL FOUND and similar you can read at Sanesecurity: Foxhole databases that these are very generic signatures with a high false positive rate, i.e. it will mainly block JS files contained inside ZIP files which is a very common attack vector when transported with mail.

Also the *JsHeur* sound very much like heuristics instead of definite pattern and thus you should expect a high false positive rate too.

Generally any antivirus product tries to find a balance between false positives and false negatives. To catch new variations of malware often heuristics like Javascript inside ZIP or vague defined pattern are used. But these also have a higher chance of matching against innocent data, i.e. a false positive.  On the other hand relying only on signatures which match well known malware but nothing else will cause lots of false negatives, i.e. malware not catched.


Securing Google Chrome Browser against the Logjam exploit on Windows Is there a way to fix Chrome against the Logjam TLS exploit on Windows? I have updated my Chrome to the latest version yet the https://weakdh.org/ website warns me that "web browser is vulnerable to Logjam and can be tricked into using weak encryption. You should update your browser."

Has a fix / patch not been released yet? Meanwhile is there a manual way to fix this?

Chrome Version 43.0.2357.65 m on Windows 7.

Edit: It seems no browser has really rolled out a fixed version yet. Wasn't it a bit premature for the authors of the Logjam paper to release it before the browser teams got a chance to at least prepare a fix? What was the big hurry?

Edit 2015-09-03: Fixed.

Fixed as of Chrome version 45 from 2015-09-01. WeakDH.org now reports:
Good News! Your browser is safe against the Logjam attack.

Most of original post preserved below.

Batch Workaround
A workaround is to create a batch file that starts Chrome and explicitly disables all ephemeral DH suites.

There are different blacklists strings floating around the internet at the moment. Below is my attempt.

Cipher suites are identified by their hex ID. And IANA has the official list of registered cipher suites.

But rather than pick and choose from that list, I decided to let OpenSSL (v1.0.2) do that for me. The suites are these:

openssl ciphers -V DHE | sort

0x00,0x11 - EXP-EDH-DSS-DES-CBC-SHA SSLv3 Kx=DH(512)  Au=DSS  Enc=DES(40)   Mac=SHA1 export
0x00,0x12 - EDH-DSS-DES-CBC-SHA     SSLv3 Kx=DH       Au=DSS  Enc=DES(56)   Mac=SHA1
0x00,0x13 - EDH-DSS-DES-CBC3-SHA    SSLv3 Kx=DH       Au=DSS  Enc=3DES(168) Mac=SHA1
0x00,0x14 - EXP-EDH-RSA-DES-CBC-SHA SSLv3 Kx=DH(512)  Au=RSA  Enc=DES(40)   Mac=SHA1 export
0x00,0x15 - EDH-RSA-DES-CBC-SHA     SSLv3 Kx=DH       Au=RSA  Enc=DES(56)   Mac=SHA1
0x00,0x16 - EDH-RSA-DES-CBC3-SHA    SSLv3 Kx=DH       Au=RSA  Enc=3DES(168) Mac=SHA1
0x00,0x32 - DHE-DSS-AES128-SHA      SSLv3 Kx=DH       Au=DSS  Enc=AES(128)  Mac=SHA1
0x00,0x33 - DHE-RSA-AES128-SHA      SSLv3 Kx=DH       Au=RSA  Enc=AES(128)  Mac=SHA1
0x00,0x38 - DHE-DSS-AES256-SHA      SSLv3 Kx=DH       Au=DSS  Enc=AES(256)  Mac=SHA1
0x00,0x39 - DHE-RSA-AES256-SHA      SSLv3 Kx=DH       Au=RSA  Enc=AES(256)  Mac=SHA1
0x00,0x40 - DHE-DSS-AES128-SHA256   TLSv1.2 Kx=DH     Au=DSS  Enc=AES(128)  Mac=SHA256
0x00,0x44 - DHE-DSS-CAMELLIA128-SHA SSLv3 Kx=DH       Au=DSS  Enc=Camellia(128) Mac=SHA1
0x00,0x45 - DHE-RSA-CAMELLIA128-SHA SSLv3 Kx=DH       Au=RSA  Enc=Camellia(128) Mac=SHA1
0x00,0x67 - DHE-RSA-AES128-SHA256   TLSv1.2 Kx=DH     Au=RSA  Enc=AES(128)  Mac=SHA256
0x00,0x6A - DHE-DSS-AES256-SHA256   TLSv1.2 Kx=DH     Au=DSS  Enc=AES(256)  Mac=SHA256
0x00,0x6B - DHE-RSA-AES256-SHA256   TLSv1.2 Kx=DH     Au=RSA  Enc=AES(256)  Mac=SHA256
0x00,0x87 - DHE-DSS-CAMELLIA256-SHA SSLv3 Kx=DH       Au=DSS  Enc=Camellia(256) Mac=SHA1
0x00,0x88 - DHE-RSA-CAMELLIA256-SHA SSLv3 Kx=DH       Au=RSA  Enc=Camellia(256) Mac=SHA1
0x00,0x99 - DHE-DSS-SEED-SHA        SSLv3 Kx=DH       Au=DSS  Enc=SEED(128) Mac=SHA1
0x00,0x9A - DHE-RSA-SEED-SHA        SSLv3 Kx=DH       Au=RSA  Enc=SEED(128) Mac=SHA1
0x00,0x9E - DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH   Au=RSA  Enc=AESGCM(128) Mac=AEAD
0x00,0x9F - DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH   Au=RSA  Enc=AESGCM(256) Mac=AEAD
0x00,0xA2 - DHE-DSS-AES128-GCM-SHA256 TLSv1.2 Kx=DH   Au=DSS  Enc=AESGCM(128) Mac=AEAD
0x00,0xA3 - DHE-DSS-AES256-GCM-SHA384 TLSv1.2 Kx=DH   Au=DSS  Enc=AESGCM(256) Mac=AEAD

And here's an ugly little script that I used to just pick the hex IDs from the list above and generate the blacklist string for me:

openssl ciphers -V DHE |
sort |
awk '{print $1}' |
sed 's/,0x//g' |
xargs echo |
sed 's/ /,/g' |
sed 's/^/--cipher-suite-blacklist=/'

And this is the output of that command:

  --cipher-suite-blacklist=0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0032,0x0033,0x0038,0x0039,0x0040,0x0044,0x0045,0x0067,0x006A,0x006B,0x0087,0x0088,0x0099,0x009A,0x009E,0x009F,0x00A2,0x00A3

(Disclaimer: This string is probably too long. I don't think Chrome even supports all of these cipher suites. (You could check using the SSL Labs client test.))

Update 2015-07-03: Chrome still vulnerable.

The official Logjam page, https://WeakDH.org/, checks for 512 bit DHE support. It internally uses the https://dhe512.zmap.io/ domain to check. Ability to connect to this domain is rated as a failure.

Chrome fails.
Internet Explorer, Safari, Firefox pass.

The actual minimum DHE bit lengths used are these:

Chrome uses a 512 bits minimum.
Internet Explorer uses a 1024 bits minimum.
Safari uses a 768 bit minimum.
Firefox uses a 1023 (not 1024) bits minimum.

(See also: Wikipedia: Logjam)

Some DH key lengths to test are here:

https://dh480.badssl.com/, Chrome rejects this with ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY.
https://dh512.badssl.com/, Chrome accepts this.
https://dh1024.badssl.com/, Chrome accepts this.
https://dh2048.badssl.com/, Chrome accepts this.

But: The a 1024 bit minimum has been announced for Chrome 45. (And I think this means September 2015. But I don't really understand the Chrome release model.)


XMAS Scan vs Inverse TCP Whats the difference between a XMAS Tree scan and an Inverse TCP scan using the FIN, URG, and PSH flags? Are they the same thing?

XMAS Tree scans are designed to manipulate the PSH, URG and FIN flags of the TCP header. The Inverse TCP scan uses TCP probe packets using the FIN, URG, and PSH flags set, or with no flags at all which is known as a Null scan. That I understand, but I dont know what difference if any there is between the two. Cant seem to find an answer here or anywhere.

I ask for legal purposes, and help is greatly appreciated.
First question on here, I apologize for any mistakes in conduct in the question or tags.

An XMAS scan has PSH and URG and FIN set, i.e. all three flags at once. An inverse TCP scan has PSH or URG or FIN or none flag set, i.e. a single flag or no flag.


PowerShell's Module logging I'm looking for some more information concerning the white paper which goes into some detail over PowerShell's Module logging.

Specifically, once this is enabled, are the default cmdlets logged?  For example, Get-Service and so on.  Looking over the About_Group_Policy_Settings for PowerShell, a reference is given to the following Group Policy path Computer Configuration\Administrative Templates\Windows Components\Windows PowerShell where Module Logging lists an example of enabling logging for Windows PowerShell Core modules by using Microsoft.PowerShell.*

My question as it relates to InfoSec, has anyone looked into this from a defender's viewpoint?  Specifically, does enabling Module logging increase the chance of exposing more attack surface and if so, are there any steps or best practices for hardening the logs and so on in an effort to mitigate the increased attack surface?

My guess would be replicate the Event Log for Windows PowerShell to a high security system or utilize encryption so that in the event an attacker discovered the Module Logging was enabled, the encryption would prevent the logs from being altered in an effort to cover the attackers tracks.

First, you didn't specify if this is for servers or for desktops.

But I'll assume servers for the moment. To directly address the logging aspects of PowerShell logging... Yes, it can log cmdlet calls. I believe 3.0 and above do this with the right GP settings.

Secondly, event logs aren't encrypted and ACL's to them are easily modified. So I personally suggest using a SIEM to remotely monitor them, so that you can look for some of the most important cmdlets, such as ones that deal with remoting, event log modification and anything relating to permissions and report that back to your monitoring tool so that in the event the local logs are modified by a malicious actor, you have the info back in your monitoring tool.

However, if you are truly interested in hardening against PowerShell exploits, you'll need to consider hardening PowerShell itself.

Ask yourself a few questions pertinent to your situation...

No matter what, upgrade to at least PowerShell 4.0. No questions on this one.
Do you want ANY user on the machine to run PowerShell scripts remotely? If not, disable the WinRM service and block ports 8495 and 8496.
Do you want ANY user to be able to execute PowerShell scripts locally?
If not, rename:

3a). C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe and powershell_ise.exe to some other name.

3b). C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe and powershell_ise.exe to some other name.

Depending on your answers to the above, this is a good start to mount a defense. But do note, this is just one layer of many. If they have admin to the box, they can rename, re-enable everything back to default, including wiping all logs.

Depending on what SIEM you use, let's assume Splunk for the moment - you can add a source to the prefetch file for PowerShell which is generally: %systemroot%\prefetch\powershell.exe.*.pf  and look for ".ps1" in the file. You can also monitor for last modified and other pertinent fields.

This is especially effective on systems which are still using PowerShell 2.0 and  don't have the ability to upgrade to PowerShell 3.0 or higher to take advantage of Windows PowerShell event logs.


What is the meaning of .ini file in startup folder? Now my windows 7 is too slow and crashing usually. I checked the start up folder. I get a file with extension .ini. The content of file is

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21769
IconResource=%SystemRoot%\system32\imageres.dll,-183

Is this dangerous?

This is a typical Desktop ini file that normally saves the folder view settings such as the background image etc. If suspect some malware is executing on the Windows startup, it might be executing from

Run and RunOnce keys in the registry
Windows Services
Windows drivers
DLL hijacking (placing itself in a path that comes before the
legitimate DLL)
Registry key of the registered shell extensions
Hidden file or shortcut in the startup folder

There might be other locations as well so your best bet is quarentine the machine and follow the standard procedure of malware cleanup. You will find plenty of examples on how to cleanup a malware infected machine on SE and other forums.


Is there any reason why PHP files require write permissions? Is there any reason why PHP files would require write access? (Excluding directories that need to be writable)

I'm installing Magento via composer. They recommend the following permissions:

cd /var/www/html/<magento install directory>
find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chown -R :www-data . # Ubuntu
chmod u+x bin/magento

Doing this makes the files writable. This is problematic. I also use the snuffleupagus PHP module to add a level of security. But, this also causes an issue when installing Magento because I get the error:

2019/12/02 03:48:57 [error] 6782#6782: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (/var/www/shop/app/etc/vendor_path.php). in /var/www/shop/app/autoload.php on line 25" while reading response header from upstream, client: 192.168.33.1, server: ucp.local, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:

I'm wondering whether to make most of these files readable/executable as there is no reason for them to be writable on the server. Is there any reason why one shouldn't do this?

I'm wondering whether to make most of these files readable/executable

PHP files do not need to be executable. That could be worse than having the write permission.

Furthermore, in the specific directories mentioned (e.g., var generated vendor pub/static pub/media app/etc) write permissions are probably required (at least for some file types). I have not tested it in depth, but generally it will break my Magento site if I don't give the permissions recommended (or a variation of them as I will mention next).

Recently I have been experimenting with an alternative permission scheme that I believe improves security. I asked a question about it here:

https://magento.stackexchange.com/questions/297324/linux-file-permissions-on-webroot-for-magento-2-when-755-and-644-are-not-good-en

The question comes from reading "You can have your cake and eat it too" at https://serverfault.com/a/357109. When I asked the question, I had not tried that scheme with Magento. I have tried it now and it works very well.

The other thing to be sure you have done is modify docroot to improve security. After doing this you should not have any executable files in the DocumentRoot of your Magento site. You can check from the command line like this:

find pub/ -type f -executable


SNMPv2 and Community Security When working with servers on the internet and doing monitoring is there any dangers using SNMPv2?

I am working with observium and have the following:
/etc/snmpd.conf

com2sec readonly  default         public
group MyROGroup v1         readonly
group MyROGroup v2c        readonly
group MyROGroup usm        readonly
view all    included  .1                               80
access MyROGroup ""      any       noauth    exact  all    none   none
syslocation City, Country
syscontact Admins sysadmins@example.com
#This line allows Observium to detect the host OS if the distro script is installed
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro

That depends. What is the risk you see with having some unknown entity be able to see your switch configuration?

By capturing SNMP v2 traffic (unencrypted) a potential attacker can map out what your network looks like, probably matching VLANs to departments and server networks, etc.

It is an information leak. You are not allowing write so they can't change anything, but they could get a very good idea of how your network works, and where to focus on attacking.
If you set it up such that the observium station across the internet connects via VPN that terminates on a management VLAN so that the traffic is contained, you could minimize who might have access to the traffic between the switch and observium.


Is it safe to view local pdf files in a browser? When receiving a pdf file by e-mail, the question is how to open it. Browsers are normally quite secure, don't support all pdf features (an advantage in this case) and the viewer/conversion might loose malicious code. On the other hand a local js might get access to local files...?

So: Is it a good idea to view attached pdf files in a browser?

(If it matters: I mostly care about Windows and a locally installed email client.)

It is generally considered safer to open PDFs in browsers, because they are better sandboxed than the other PDF readers installed on your computer. The sandbox should prevent the browser to access your local files (I'm simplifying a little). Anyway, if the PDF is malicious and targets (for example) Adobe Reader, nothing prevents Adobe Reader to access your local files, so in any case using a browser does not make you more vulnerable against this attack.


Typical mistakes when implementing digital signatures? I am looking for a list of typical mistakes someone can make when implementing digital signatures for a software. And of course why they are mistakes and how an attacker could take advantage of them.

I do not mean implementing the crypto itself but applying/using a library (like GPG or something alike) in your own project.

What I thought of so far:

Using weak algorithms for encryption and/or hashing. -> Attacker could fake a valid signature because he is able to find collisions.
Wrong handling of public keys (for example a application just downloads a public key it needs for verification of a unknown signature). -> Man in the Middle attackers could replace the downloaded public key with their own and the application would verify files of the attacker.
Signatures are not verified correctly (for example the software just tests if there is a signature, not if its valid.) -> Attacker could use "fake" signatures.

Are those possible mistakes to make? Are the implications correct?

Please give me your ideas on the topic.

Thanks in advance!

EDIT:
This is for an assignment in a security class. So i just want to collect some ideas. They to not have to fit a specific system, protocol or software. Just some mistakes one could make in practice.

Ok here is a good one that is not commonly mentioned as a digital signature security risk.

There is a technique  called blind signature. Which usually used for anonymous authentication like in anonymous P2P network, electronic voting, digital cash, etc.

Now, if the system use the same private key for regular digital signature and for blind digital signature there is a huge risk that an attacker can foul the system and cover data encrypted by the server public key.
See Blind Signature for more details.

Of course, the solution is to use different private keys, one for regular digital signature and one for blind signature


DDoS Mitigation - Whitelist or Blacklist Incoming SOURCE Ports? For a network offering webservices, I have had recommendations to blacklist a couple of common incoming DESTINATION ports, such as UDP 53, to combat the increasing load from DDoS. I'm wondering if it makes sense to blacklist attackers SOURCE ports as well. What's the industry practice?

In terms of security, it is better to have a whitelist approach rather than a blacklist. As Neil has clearly pointed out, you should only allow ports for incoming connections in your firewall that corresponds to the services that you are providing and need to accessed from the outside.
Hope my answer helps you better understand the situation.


Alternatives to blocking suspicious IP addresses? I think every company uses the same process of blocking IP addresses that generate suspicious traffic as a way to mitigate attacks. However, that is a never ending process of chasing attackers instead of being one step ahead of attackers.

Are there any methods that go beyond just blocking the IP of suspicious traffic? Especially since any attacker worth anything will always be spoofing their IP.

For example, is there a way to: flag suspicious traffic, analyze the traffic, create a fingerprint of the traffic, develop a signature based on the fingerprint, and finally automate the process of preemptively suppress traffic that match the tainted signature.

Does that make sense? Please ask clarifying questions if it doesn't make sense.

PS: This is my first SE post so I hope everything is in order.

There are other alternatives, collective honeypots that generate lists of commons attackers is an alternative. I maintain a list built from the result of some honeypots (both public and private), and some production servers that I own.

There is a way to analyse everything on internet like a global ids system ? Yes, there is, but if you ever used an IDS/IPS system before, you would imagine how much false-positives would be generated and the amount of processing power needed to run it on a global scale.

You can focus on protecting your company, a good firewall, web application firewall, an IDS/IPS solution, good internal procedures, security policies, regular pentests, antivirus solutions, training the users so they don't open on everything that they receive via e-mail, and the list goes on, there are several things that you can do to help.

You can always do some proactive job, but imagine the scenario where the attacker, never attacked any other host before, so he won't be on any list, and his first attack is against your company. It's the concept of pre-crime, how did you know that he will attempt to do something and block it before ?

Don't ever expect that one solution will make you 100% secure, if you apply my list to your firewall, you will still vulnerable to the above scenario and several others. But usually hosts that are compromised, and became part of a botnet, will launch several kinds of attacks and scans. Keep that in mind when you try to block something.


Failed logins on a windows server - performance impact? I have recently started analysing our logs and noticed 600-700 failed login attempts per day against a windows 2016 server hosting some shared files.

I know what the cause is (another misconfigured server), however I was wondering what impact those requests would have on the server?

Would it affect performance in anyway, or is it just a minor annoyance when I am reading logs?

Obviously it is going to be fixed, but I don't know how urgent I need to make it sound. Not sure if I should be treating it as a minor DoS-type issue or just sticking it on someones todo list.

(Assuming a high-speed network, 4 CPU, 8GB RAM)

Thanks!

An inbound network logon within Windows will generally have negligible measurable effects on a machine and a failed logon attempt will have even less. However, it is a non-zero cost and whether it will impact your workload is entirely dependent on the resources consumed vs available.

You have to measure what sort of overhead your server has normally. If it's constantly running hot at >95% CPU, or is constantly running out of disk space it might put you over through e.g. event log growth (if it's not constrained to a fixed upper limit).


Isn't password storage designed to not un-mask passwords? Twitter revealed that its passwords got unmasked in internal logs. But correct me if I am wrong, passwords are never unmasked, right?

E.g. if the plaintext is "password", it is stored as "#masked". During authentication, "password" is masked to "#masked", and it is checked that masked==stored.

So how did some internal process end up unmasking them?

I speculated about the ways this could happen on my blog, but the crux of the matter is that your password is received by the server as plaintext.  (Yes, it's in a TLS stream, but that's decrypted before being handed off to the application layer.)  It's very likely that some kind of debug code was accidentally enabled and resulting in logging the HTTP request, an RPC between microservices, or some other form of intermediate product.

It (likely) wasn't "let's log the password" but more like "let's log these serialized JSON requests to backend services" and one of those services happened to be the authentication backend.


How does a VPN protect a MITM attack in your network? Sorry if this has been asked before but I couldnt find any good reasonable answer. So from my current understandings, every requests you made from your laptop needs to be sent to the access point first (router) and when you connect to a VPN, this requests are sent from the access point to the VPN server to be encrypted.

So how does this stop someone from doing a MITM attack between the access point and your devices? Or between the access point and the vpn server?

If someone is sitting between you and your router, then they will be able to get your data by using any sniffer. Once the connection is made from your router to vpn concentrator( vpn server), then they will be seeing only encrypted data which is of no value to the attacker.