Better HN
topnewbestaskshowjobs
Log inSign up

LinuxBender

57,650 karma · joined Jun 16, 2015 (11y ago) · 19,241 submissions

I am not for everyone. To ignore me in uBlock Origin, add to "My filters":

   news.ycombinator.com##tr.athing.comtr:has(a.hnuser):has-text(/\bLinuxBender\b/)
For HN usage questions see https://github.com/minimaxir/hacker-news-undocumented for HN tips (not my repo)

    (\_/)
    (='.'=)
    (")_(")
Submissions

10861.

Covid in Wales: Restrictions to ease after Omicron peak(bbc.co.uk ↗)

2 points · by LinuxBender · 4y ago · discuss

10862.

UK's Crown Estate, Volta Trucks to run electric truck trial in London(reuters.com ↗)

2 points · by LinuxBender · 4y ago · discuss

10863.

Avatar robot goes to school for ill German boy(reuters.com ↗)

1 points · by LinuxBender · 4y ago · discuss

10864.

US intelligence indicates Russia preparing operation to justify invasion Ukraine(lite.cnn.com ↗)

6 points · by LinuxBender · 4y ago · discuss

comment 4y ago · link · parent

I am looking forward to seeing a detailed list created by these doctors and scientists with time stamps from the interviews that counter or refute the statements with references both with the interview of Dr. Malone and the interview with Dr. Peter McCullough. If there are alternate sides to the story then we should all have access to them and hear what the medical community have to say. Even better might be if the medical community put forth some doctors to be interviewed on these podcasts.

comment 4y ago · link · parent

Based on the original news coverage I though this mob was just a few clown youtube activists leading a bunch of angry protesters. Someone here on HN corrected me and digging a bit deeper it appears that the corporate news missed a lot of details.

It turns out that everyone knew who would be there, what weapons they would have and their intentions. The only thing they got wrong AFAIK was the clothing. The militia that usually wear Hawaiian shirts were in plain clothes but they were still spotted instantly. Here is a documentary that covers this fairly well and everything leading up to it. [1] No covert communications. The militias were using public podcasts and social media sites to communicate and coordinate with one another and people were using machine learning to predict their actions quite accurately.

The bit I don't quite understand is why the Whitehouse had only a normal contingent of police in standard gear. These police were barely equipped to deal with a black Friday sale at Walmart much less a massive mob with some militia stirring them up.

[1] - https://www.youtube.com/watch?v=v22xC09WSVc

comment 4y ago · link · parent

Correct. For that you would populate the variable TMOUT to a positive number in seconds and make that variable read-only

  grep ^read /etc/profile.d/timeout.sh
  readonly TMOUT=7200
This variable can also be set in tmux and gnu screen. People usually figure out fairly quick how to bypass the timer but it is handy when people console into servers via the drac/ilo and forget to log out. Some shells don't do anything with TMOUT so a bastion must only have vetted shells.

comment 4y ago · link · parent

Sorry I have never used it so I don't have an opinion. That looks like an oauth/openid/saml ssh integration?

comment 4y ago · link · parent

Good writup. One thing I would add for bastions if you wanted to harden them would be to disable session multiplexing if you are using MFA/2FA.

  MaxSessions 1
The default is 10. The plus side of multiplexing is that subsequent connections using the same ssh connection channels are not validated against the authorization mechanisms such as login or 2FA. This reduces friction and speeds up the login process because login is not actually occurring. The trade-off of multiplexing is that all subsequent logins using that ssh connection are not logged nor are they validated with MFA. This means a person phishing your team members can easily hijack their connections without needing a password or 2FA and there are no lastlog entries. SSH Session multiplexing combined with passwordless sudo makes taking over a company trivial even if they have 2FA and strong passwords.

Another risk with a bastion model is port forwarding. As an organization you have to decide what is appropriate for that bastion. Unrestricted forwarding? Restricted? Denied?

  AllowAgentForwarding                    no
  AllowTcpForwarding                      yes
  PermitOpen                              192.168.1.2:22
If this bastion is for a PCI environment then one may want tighter restrictions. If it is for a development environment then maybe less restrictions and just better auditing on each host to enable forensic remediation.

If your bastion is also used for automation to drop files into a staging area, you can limit that automation to file transfers and even limit what it may do with files. This prevents the automation from having a shell or performing port forwarding.

The keys should be outside of the home directories to prevent malicious tools from appending additional authorized_keys into the account. Make use of automation to manage key trusts and add a comment to keys to map them to an internal tracking system like Jira. This assumes your MFA/2FA is excluding specific accounts or groups via PAM and permitting the use of ssh keys with specific groups or accounts.

  AuthorizedKeysFile               /etc/ssh/keys/%u

  Match Group                      sftpusers
        Banner                     /etc/ssh/banner_sftp.txt
        PubkeyAuthentication       yes
        PasswordAuthentication     no
        PermitEmptyPasswords       no
        GatewayPorts               no
        ChrootDirectory            /data/sftphome/%u
        ForceCommand               internal-sftp -l DEBUG1 -f AUTHPRIV -P symlink,hardlink,fsync,rmdir,remove,rename,posix-rename
        AllowTcpForwarding         no
        AllowAgentForwarding       no
-P sets limits on what may not be done in sftp. -p does the inverse and limits what may be done. [1] -l DEBUG1 or VERBOSE will give you syslog entries of what commands were executed on the files. This is useful for audits. Some redundant settings above are also useful to set explicitly for audits.

Another thing mentioned in the article is iptables. In a PCI environment one may want to also have explicit outbound rules using the owner module to limit what users or groups are permitted to ssh out. So if your organization have a group of people allowed to use this host as a bastions, then one could write a rule like

  iptables -I OUTPUT -m owner --gid-owner devops -p tcp --dport 22 -d 192.168.0.0/16 -j ACCEPT
Or specify what CIDR blocks, ports, protocols may be used. You can use REJECT rules after this rule to make it obvious a connection was not allowed so that people do not spend hours debugging. This module is also handy for limiting which daemons may speak to your infrastructure. How strict or liberal the rule is entirely at the needs of your organization.

Lastly I would add that bastions should have as minimal an OS install possible and have SELinux enforcing. Actions denied by SELinux should go to a security operations center after you spend some time tuning out the noise and false positives.

[1] - https://man7.org/linux/man-pages/man8/sftp-server.8.html

comment 4y ago · link · parent

one of our domains has mysteriously dropped from the internet

Well that's not good. Lets hope they have an audit trail that can tell you what went wrong. Without the details of your domain I could only guess. I'm sure they and cloudflare together could help you figure it out.

comment 4y ago · link · parent

Seems to be working for dns.

  dig +noall +answer @ns3.digitalocean.com -t ns digitalocean.com
  digitalocean.com.       1800    IN      NS      ns2.digitalocean.com.
  digitalocean.com.       1800    IN      NS      ns3.digitalocean.com.
  digitalocean.com.       1800    IN      NS      ns1.digitalocean.com.

  dig +noall +answer -t soa digitalocean.com
  digitalocean.com.       3600    IN      SOA     kim.ns.cloudflare.com. dns.cloudflare.com. 2263777094 10000 2400 604800 3600
They could probably point the https listener to a landing/parking page unless this supposed to be a DoH endpoint but I doubt that is the intention. Have you opened a ticket with them to inquire?

10872.

Raspberry Pi Can Detect Malware by Scanning for Electromagnetic Waves(gizmodo.com ↗)

11 points · by Bender · 4y ago · 3 comments

10873.

What to pack in your car to stay safe during severe winter weather(lite.cnn.com ↗)

3 points · by LinuxBender · 4y ago · discuss

10874.

What are snow squalls and why they're more dangerous than blizzards(lite.cnn.com ↗)

1 points · by LinuxBender · 4y ago · discuss

10875.

An expert weighs in on how parents should care for a child who tests positive(lite.cnn.com ↗)

1 points · by LinuxBender · 4y ago · discuss

comment 4y ago · link · parent

Should e-cigarettes be licensed as medicines?

Only if you also require regular cigarettes to be licensed as medicines, or if you want to create yet another illegal market.

The tobacco companies did a good job of making it harder to use vapes. History has made me heavily biased to see any attempt to make alternatives to tobacco harder to acquire something that must be in some way funded by big tobacco. I see that as a personal attack on a family member that has been trying to stay away from tobacco.

comment 4y ago · link · parent

Covid-19 does not match the characteristics that the CCP are stating they wish to develop [1] in regards to targeted biological weapons. The closest I could see to calling covid-19 a targeted weapon would be against people that are already sick have comorbidity. Otherwise at best it disrupts every economy to some degree. It has done a good job of dividing people, creating distrust, angst and anxiety but I would argue that impacted China as well. I could however see a disgruntled lab tech that is angry at the world releasing it. People throw their lives away for far less impact all the time think mass shootings. For a government to use this type of virus as a weapon would require first inoculating all of the people they value against it.

[1] - https://www.youtube.com/watch?v=biNxl7tiVSY [video]

comment 4y ago · link · parent

Thankyou, I am surprised I missed that talk. That implementation seems rather fragile to me. Assuming everything is working as designed one would have to be wearing the watch ahead of time in a home defense situation. That is also a lot of extra moving parts that could fail especially at the range after going through a few boxes of rounds. thinking thermal issues but maybe they tested that

comment 4y ago · link · parent

It sounds like you are describing something like a hosted Nextcloud [1] instance but I have no idea if that makes sense cost-wise. They have a comparison page [2] that also mentions some of the other related services. I have only used the self-hosted version of their applications and honestly have no idea how much their hosted solution costs.

[1] - https://nextcloud.com/

[2] - https://nextcloud.com/compare/

comment 4y ago · link · parent

render lost or stolen guns useless

Has anyone put this to the real world test? i.e. Give one of these smart firearms to a few dozen gunsmiths, locksmiths or other curious tinkerers and hardware hackers? Bounty programs?

Anyone here on HN own one of these? How long does it take to disengage the lock if you are the authorized owner?

10881.

What is chronic wasting disease?(usgs.gov ↗)

2 points · by LinuxBender · 4y ago · discuss

10882.

Log4j: How hackers are using the flaw to deliver this new 'modular' backdoor(zdnet.com ↗)

1 points · by LinuxBender · 4y ago · discuss

10883.

Internet blimps are coming to Zanzibar(lite.cnn.com ↗)

3 points · by LinuxBender · 4y ago · discuss

10884.

US Cancer Deaths on Decline(lite.cnn.com ↗)

5 points · by Bender · 4y ago · 1 comment

10885.

DespeSchool districts ask parents and various staff to become substitutes(lite.cnn.com ↗)

1 points · by LinuxBender · 4y ago · discuss

comment 4y ago · link · parent

Would the DBA's on this thread consider committing code to the MySQL [1] and Postgres [2] tuner scripts that give new DBA's all your learned advise and battle hardening experience? This thread appears to be such an example.

[1] - https://github.com/major/MySQLTuner-perl

[2] - https://github.com/jfcoz/postgresqltuner

comment 4y ago · link · parent

That brings back memories. Long ago my family had an AMG Hornet and in the engine compartment was a large red button. Ever so often we had to hold the button down to "reset the engine" or it would not function.

I had higher hopes for Tesla. Can you imagine if SpaceX rockets had these issues?

comment 4y ago · link · parent

More details here [1] and here [2]

[1] - https://stackoverflow.com/a/61946687

[2] - https://askubuntu.com/questions/123072/ssh-automatically-acc...

comment 4y ago · link · parent

Something that I believe should be added to this thread would be utilities that can take the LastPass export and transform it into structures that other pw managers can easily recognize and import.

Here [1] is an example of migrating passwords from LastPass to KeePassXC. Does anyone have more examples like this for other pw managers?

[1] - https://blog.paranoidpenguin.net/2018/12/migrating-from-last...

1
362363364
642