[컴][웹] firefox 에서 보안설정 간편하게 하기

firefox 보안 / 파폭 설치 후  / 파이어폭스

firefox 에서 보안설정 간편하게 하기

user.js 를 이용해서 설정을 간단하게 할 수 있다.

user.js

주의할 점은 user.js 에 설정된 값은 firefox 내에서 수정해도, firefox 를 껐다켜면 다시 값을 user.js 로 복구시킨다. 한번 사용하고 user.js 는 지우면된다.

  • profile folder:
    • Windows: %APPDATA%\Mozilla\Firefox\Profiles\
    • Linux: /home/<USRNAME>/.mozilla/random.default.
    • Android: /data/data/org.mozilla.firefox/files/mozilla/xxxxxxxx.default/
  • profile folder 에 user.js 를 copy 해 놓으면 된다. 그러면 firefox 가 시작할 때 user.js 의 내용을 prefs.js 로 내용을 copy 한다.(참고: User.js file - MozillaZine Knowledge Base)
  • backup : 혹시 모르니 prefs.js 를 backup 해 놓자.
  • firefox 를 닫고 나서 작업을 하고 다시 켜자.(android 에서는 '강제종료'를 하고 하자.)

UTC Time zone

resistFingerprinting 가 기본 timezone 을 UTC 로 설정한다. 그래서 일부 website 에서 시간정보가 제대로 보이지 않을 수 있다. 참고하자. (firefox 79.0)

user.js

example

아래 예제는 ref.2 에서 가져와서, 몇개를 수정했다.

// Heimdallr -- Added -- Privacy Enhanced
// Disable Telemetry
user_pref("browser.urlbar.trimURLs","false");  
user_pref("browser.newtabpage.activity-stream.feeds.telemetry","false");
user_pref("browser.newtabpage.activity-stream.telemetry","false");
user_pref("browser.pingcentre.telemetry","false");
user_pref("devtools.onboarding.telemetry-logged","false");
user_pref("media.wmf.deblacklisting-for-telemetry-in-gpu-process","false");
user_pref("toolkit.telemetry.archive.enabled","false");
user_pref("toolkit.telemetry.bhrping.enabled","false");
user_pref("toolkit.telemetry.firstshutdownping.enabled","false");
user_pref("toolkit.telemetry.hybridcontent.enabled","false");
user_pref("toolkit.telemetry.newprofileping.enabled","false");
user_pref("toolkit.telemetry.unified","false");
user_pref("toolkit.telemetry.updateping.enabled","false");
user_pref("toolkit.telemetry.shutdownpingsender.enabled","false");

// Disable Plugin Scanning
user_pref("plugin.scan.plid.all","false");

// Disable Geolocation
user_pref("geo.enabled","false");

// Disable all disk caching PERIOD
user_pref("browser.cache.disk.enable","false");
user_pref("browser.cache.disk_cache_ssl","false");
user_pref("browser.cache.memory.enable","false");
user_pref("browser.cache.offline.enable","false");
user_pref("browser.cache.insecure.enable","false");

// Disable formfill
user_pref("browser.formfill.enable","false");

// Disable Zero Round Trip Time Resumption
user_pref("security.tls.enable_0rtt_data","false");

// Use only TLS 1.2 and 1.3
user_pref("security.tls.version.min","3");

// Disable Triple DES cipher
user_pref("security.ssl3.rsa_des_ede3_sha","false");

// Use strongest cipher
user_pref("security.ssl3.dhe_rsa_aes_128_sha", false);
user_pref("security.ssl3.ecdhe_ecdsa_aes_128_gcm_sha256", false);
user_pref("security.ssl3.ecdhe_ecdsa_aes_128_sha", false);
user_pref("security.ssl3.ecdhe_rsa_aes_128_gcm_sha256", false);
user_pref("security.ssl3.ecdhe_rsa_aes_128_sha", false);
user_pref("security.ssl3.rsa_aes_128_sha", false);

// Evade Finger printing
user_pref("privacy.resistfingerprinting","true");

// Disable the HORRIBLE webRTC
user_pref("media.peerconnection.enabled","false");

// Disable Prefetching
user_pref("network.dns.disablePrefetch","true");
user_pref("network.prefetch-next","false");

// Disable Referrer Headers (WHY is this is a thing)
user_pref("network.http.sendRefererHeader","0");

// Disable direct GPU access (WEBGL)
user_pref("webgl.disabled","true");

// Disable battery life check
user_pref("dom.battery.enabled","false");

// Disable session identifier
user_pref("security.ssl.disable_session_identifiers","true")

// Make requests only to site being visited
user_pref("privacy.firstparty.isolate","true")

// Disable auth fast starts 
user_pref("security.ssl.enable_false_start","false")

// Disable new tab privacy concerns
user_pref("accessibility.force_disabled", 1);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
user_pref("browser.newtabpage.activity-stream.feeds.section.highlights", false);
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories.rec.impressions", "{\"50465\":1576448311544,\"50504\":1576448311544,\"50513\":1576448311544}");
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories.spoc.impressions", "{\"2323\":[1576448311615,1576448311641,1576448317243]}");
user_pref("browser.newtabpage.activity-stream.feeds.snippets", false);
user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false);
user_pref("browser.newtabpage.activity-stream.feeds.topsites", false);
user_pref("browser.newtabpage.activity-stream.impressionId", "{bc349b2a-4696-4afa-bf4f-48d1fd919fe0}");
user_pref("browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned", "google,amazon");
user_pref("browser.newtabpage.activity-stream.prerender", false);
user_pref("browser.newtabpage.activity-stream.section.highlights.includeBookmarks", false);
user_pref("browser.newtabpage.activity-stream.section.highlights.includeDownloads", false);
user_pref("browser.newtabpage.activity-stream.section.highlights.includePocket", false);
user_pref("browser.newtabpage.activity-stream.section.highlights.includeVisited", false);
user_pref("browser.newtabpage.activity-stream.showSearch", false);
user_pref("browser.newtabpage.activity-stream.showSponsored", false);
user_pref("browser.newtabpage.enabled", false);
user_pref("browser.newtabpage.storageVersion", 1);

// Disable spell check and enable clear on shutdown
user_pref("layout.spellcheckDefault", 0);
user_pref("network.cookie.cookieBehavior", 4);
user_pref("network.cookie.lifetimePolicy", 2);
user_pref("network.http.speculative-parallel-limit", 0);
user_pref("network.trr.mode", 2);
user_pref("pdfjs.enabledCache.state", true);
user_pref("pdfjs.migrationVersion", 2);

// Correct Permissions
user_pref("permissions.default.camera", 2);
user_pref("permissions.default.desktop-notification", 2);
user_pref("permissions.default.geo", 2);
user_pref("permissions.default.microphone", 2);

// Enable privacy sanitization and disable PDF full page
user_pref("plugin.disable_full_page_plugin_for_types", "application/pdf");
user_pref("pref.privacy.disable_button.cookie_exceptions", false);
user_pref("privacy.clearOnShutdown.downloads", true);
user_pref("privacy.clearOnShutdown.formdata", true);
user_pref("privacy.clearOnShutdown.history", true);
user_pref("privacy.clearOnShutdown.offlineApps", true);
user_pref("privacy.clearOnShutdown.sessions", true);
user_pref("privacy.clearOnShutdown.siteSettings", true);
user_pref("privacy.donottrackheader.enabled", true);
user_pref("privacy.history.custom", true);
user_pref("privacy.resistFingerprinting", true);
user_pref("privacy.sanitize.pending", "[]");
user_pref("privacy.sanitize.sanitizeOnShutdown", true);
user_pref("privacy.trackingprotection.cryptomining.enabled", true);
user_pref("privacy.trackingprotection.enabled", true);
user_pref("privacy.trackingprotection.fingerprinting.enabled", true);
user_pref("toolkit.telemetry.reportingpolicy.firstRun", false);
user_pref("trailhead.firstrun.didSeeAboutWelcome", true);

See Also

  1. http://browserspy.dk/: 자신의 브라우저가 어떤 정보를 노출시키는지 확인할 수 있다.
  2. GitHub - yokoffing/Betterfox: user.js file to harden Firefox and optimize privacy, security, and speed : 여러가지 preset 들이 있다.
  3. 쿠...sal: [컴][웹] firefox 보안 관련 설정

Reference

  1. Profiles - Where Firefox stores your bookmarks, passwords and other user data | Firefox Help
  2. Firefox Hardening Tips 2019 - Wikis & How-to Guides - Level1Techs Forums, 2019-01-18
  3. Guide: Hardening Mozilla Firefox For Privacy & Security 2016 | Cyber Security Wiki | Viking VPN Service

[컴] 알아두면 좋을 linux commands

linux commands / linux / 리눅스 커맨드 / command / linux command

알아두면 좋을 linux commands

dpkg -l

  • 설치된 package 들 확인방법
  • Cent OS/ RedHat
    • dnf list installed
  • Debian / Ubuntu
    • dpkg -l
    • apt list --installed

dpkg-query -L python3

  • 설치된 package 의 file 들이 어디에 있는지 알 수 있다.

apt-cache search python3

  • apt 에 의해 설치가능한 default Ubuntu repository 들에 있는 package 이름들을 찾아준다.

whereis python3

  • binary, source, manual page files 들을 찾아준다.

locate python3

  • python3 가 들어가 있는 모든 파일의 path 를 보여준다.

  • 사용하기 위해서는 sudo updatedb 가 필요하다.(참고: UPDATEDB - Linux StepByStep)

  • vi /etc/updatedb.conf 에서 PRUNEPATHS 로 원하지 않는부분에 대한 index 를 만들지 않을 수 있다.(updatedb.conf(5) - Linux man page)

  • {.code} PRUNE_BIND_MOUNTS="yes" PRUNENAMES=".git .bzr .hg .svn" PRUNEPATHS="/tmp /var/spool /media" PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf fuse.glusterfs fuse.sshfs ecryptfs fusesmb devtmpfs"

which python3

  • 현재 상태에서 실행하고 있는 python3 가 어떤 path 에 있는 python3 인지 알려준다.

iptables

netstat -lntu

  • -l : listening port
  • -n : port number
  • -t : tcp port
  • -u : udp port

아래 ss 를 확인하자.

cat /etc/passwd

  • 등록된 모든 유저 리스트

sudo useradd -m new_user

  • 등록된 모든 유저 리스트
  • -m : home directory 를 함께 만들어 준다.

passwd new_user

  • 암호 설정

sudo userdel -r new_user

  • user 계정 삭제
  • -r : home directory 포함 삭제

usermod -d /path/to/dir username

  • user 계정, 기본 접속 directory 변경
  • home directory 은 /etc/passwd 에서 확인이 된다.

alias function alias

# python activate
function ac() { source ~/env/$1/bin/activate; }

# history 내 특정 내용 찾기
function hs() { history | grep $1; }

# wsl 등에서 사용할 때 유용, windows path 를 wsl path 로 변경
function cdw() {
  result=$(echo "$1" | sed -e 's.\\./.g' -e 's/\/wsl\$\/Ubuntu//')
  cd $result
}

# 특정 owner 를 변경 할 때
alias chuser='sudo chown user:user $1 -R'

lsb_release -a / grep . /etc/*-release

  • linux standard base 정보
  • uname -r : 배포판 커널 버전을 알 수 있다.

chown

  • chown -R userid directory
  • chown userid:usergroup file

groups

  • 어느 그룹에 속해있는지 알려준다.
  • groups userid
  • chgrp userid file.txt

usermod -a -G groupname username

원하는 그룹에 특정 user 를 추가할 때 사용한다.

usermod -a -G group1,group2 username 이런 식으로 사용할 수도 있다.

group 을 추가하는 것은 groupadd mynewgroup을 사용하면 된다. 

삭제 1

  • gpasswd -d username group1 : group1 을 지운다.

삭제 2

  • groups username : 현재 속해있는 group 을 확인
  • usermod -G group1,group2 username : -a 없이 사용하면 username 가 group1,group2 에만 속하게 된다.

/etc/group 을 수정하는 방법도 있다.

user

find . -name '*filname*'

  • 현재폴더에서 recursive 하게 filename 을 찾아준다.

  • function fs() { key=$(echo “$1”) find . -name $key }

lsof <file_name>

특정한 파일 및 디렉토리를 사용하고 있는 process를 보여준다. 어떤 process 가 이 파일에 lock 을 걸고 있는지등의 파악에 사용할 수 있다.

ss -tulnp

socket 정보를 보여준다. 열려있는 port 를 확인할 때 사용할 수 있다.(참고: 3 ways to check open ports in Linux - SSLHOW)

update-alternatives

여러가지 버전이 설치된 경우 아래처럼 사용해서 현재 사용될 version 을 지정해 줄 수 있다.

sudo update-alternatives --config java
sudo update-alternatives --config javac

my functions in .bashrc

function ac() { source ~/a/env/$1/bin/activate; }
function hs() { history | grep $1; }
function cdw() {
  # \\wsl$\Ubuntu\home\namh --> /home/namh
  result=$(echo "$1" | sed -e 's.\\./.g' -e 's/\/wsl\$\/Ubuntu//')
  # d:\a\prog\docker\superset\superset --> /mnt/d/a/prog/docker/superset/superset
  unixpath=$(echo "$1" | sed -e 's.\\./.g' | sed 's/^\([a-zA-Z]\):/\/mnt\/\L\1/')
  
  cd $unixpath
}
function fs() { 
  key=$(echo "*$1*")
  find . -name $key
}
alias chnamh='sudo chown na:na $1 -R'

See Also

  1. 쿠...sal: [컴][리눅스] systemd 사용법
  2. GitHub - ibraheemdev/modern-unix: A collection of modern/faster/saner alternatives to common unix commands. : 리눅스에서 쓸만한 새로운 명령어들
  3. explainshell.com - ls -lAGh1vX –group-directories-first –color=auto : 리눅스 명령어를 넣으면, 어떤 명렁어이고, 옵션의 의미는 무엇인지를 알려준다.
  4. 쿠…sal: [컴][리눅스] disk 사용량 관련 리눅스 명령어 정리
  5. How to use HAProxy stats socket – sleeplessbeastie’s notes : haproxy 를 모니터링 할 때 쓸 command

[컴] 백업 방식들

백업 / 백업 방식 / 운영 노하우/

백업 종류

  • full backup: 모든 것을 백업
    • 백업 주기: 매주(또는 그 보다 긴 주기로) 실행하는 것이 보통.
  • incremental backup(증분 백업) : 변경된 것만 백업하는 것
    • 백업 주기: 증분 백업은 매일 밤
  • synthetic full backup(통합 풀 백업) : 복원은 풀 백업처럼 하지만 백업은 그렇지 않은 백업이다.

주기적으로 전체 백업을 실행하는 이유

증분 백업으로 순차적으로 백업하면, 특정부분이 지워지고, 업데이트되는 등 비효울 적이다. 그래서 적정수준까지 full backup 으로 살리고, 이 이후 부분만 incremetal backup 을 복원(retore)하면 된다.
하지만 전체 백업을 수행하면 그 서버에 상당한 부하가 간다.
백업과 복원 효율성 사이의 trade off 가 있다.

백업방식

결과적으로 file 의 저장이 어떤 방식으로 이뤄져 있느냐에 따른 분류인듯 하다.

1. Copy

  • 가장 흔한 방법
  • 각 파일을 한 매체에서 다른 매체로 간단히 복사.(최신 파일 리스트와 파일 버전을 보고)
  • 백업 중인 시스템에 아무런 영향을 미치지 않는다.
  • 이 방법은 테이프나 디스크에서 활용
  • 시간이 오래 걸린다.

2. Block level incremental backup Snapshot

  • 디스크에서만 가능
  • 백업 시스템이 변경된 각 파일이나 블록을 스토리지 시스템에 별도의 개체로 저장하는 경우에만 가능한 방법
  • 백업 시스템이 전통적으로 백업본을 저장하던 방식, 즉, 여러 파일을 컨테이너 내부에 넣는(예: tar형식 또는 상용 백업 형식)과는 대비된다.
  • 전체 백업본을 각 object 에 대한 최신버전들의 모음(gathering) 으로 만들수 있다.(snapshot)
  • 데이터의 이동이 없기 때문에 통합 풀 백업본을 만드는 시간이 거의 걸리지 않는다. 그래서 훨씬 더 자주 만들 수 있다.
  • 실제로 이 방식을 지원하는 시스템은 대부분은 특정 파일이나 object 가 백업이 되면, 자동으로 '전체 백업본'을 만든다.
    • 블록 수준 증분 영구 백업 시스템(block-level incremental permanent backup system, block-level backup)
    • 전체 백업본을 만들어야 할 일이 없다.

3. virtual full backup

Reference

  1. 복원과 백업을 모두 효율적으로··· ‘통합 풀 백업’이란? - CIO Korea, 2020-05-15

[컴][그래픽] 언리얼엔진 5의 Nanite, Lumen

언리얼 엔진 5 / 최신 그래픽 기술 / 나나이트, 루먼

Unreal Engine 5 Demo

일정

  • Unreal Engine 5 는 2021년 초에 early preview 가 나올듯.
  • 2021년 하반기에 full release 가 가능할 것으로 보고 있다.

royalty

언리얼 엔진을 사용해서 만든 모든 프로젝트에서 개발자들이 벌어들인 전체매출에서 첫 100만달러에 대한 로열티는 포기한다고 발표(waive royalty)

demo

Nanite

  • 가상화된 마이크로폴리곤 기하학(micropolygon geometry)
  • 육안으로 식별할 수 있는 최대치의 섬세한 디테일을 구현할 수 있도 해준다.
  • 언리얼의 주장으로는 펙셀크기의 triangle들을 만든다고 한다.
  • 이 기술로 Unreal Engine 에서 성능저하 없이 몇십억개의 polygon 이 필요한 assets 도 사용 가능하다고 한다.
  • 데모에 나오는 '조각상'이 한개에 3천3백만개의 triangle 을 사용했다고 하는데, 같은 동상이 500개 있는 방에서도 문제가 없다.
  • 수십억게의 폴리곤으로 이뤄진 model 들을 import 하면 Unreal 이 실시간으로 streaming 과 scaling 을 처리해 준다
  • 개발자는 그리는것, 폴리곤개수, 폴리곤 메모리 예산등을 신경쓸 필요가 없다.

Lumnen

  • global illumination(GI) system : 전체적인 조명 시스템
  • 빛에 의한 기하학 내의 변화를 실시간으로 반응한다.
  • 거대하고 정교한 환경에서, 끝없는 bounce 와 간접적인 거울반사들(specular reflections)을 이용해서 시스템은 diffuse interreflection(상호 산란 반사) 을 render 한다.(거울반사, 산란반사 참고)

Reference

  1. 언리얼 엔진 5 최초 공개 - Unreal Engine
  2. Unreal Engine 5's new Lumen and Nanite systems brings near photorealistic environments to the PS5 - TechSpot, 2020-05-13

[컴][HW] 미니 pc


mini pc / 저렴한 pc / 가벼운 / 작은 pc / 부피가 작은 / 가정용 / 애플 미니 / 집에서 / 조립용 / 미니 itx /

미니 PC

  • 베어본(ex: AsRock DeskMini)
  • 사이즈: MiniITX
  • Power: 120W 19V, 외부 전원 adapter
  • CPU : AsRock 은 i7 까지도 지원, AMD 용도 나왔다.
  • RAM : 노트북용 RAM
  • SSD : 2개까지 설치가 가능하다.
  • 다나와 '미니PC' : http://prod.danawa.com/list/?cate=112766
  • 가격
    • cpu 를 따로 설치해야 하는 '베어본' 형태는 10~20만원
    • 셀러론을 달고 나온 mini pc 는 대략 20~30만원 선

[컴] Visual Test Automation Tool - SikuliX

비쥬얼 오토메이션 툴 / 그래픽 테스트 / ui test / graphical test tool / visual test automation / 툴 / 도구 / 셀레니엄 / selenium / 연동 / 웹 자동화 테스트 / 이미지 비교 / 이미지 확인 체크 / 테스트

Visual Test Automation Tool

Commercial Tools

  • Applitools Eyes
  • Screener.io
  • Percy.io

Open source tools

  • PhantomCSS
  • WebdriverCSS
  • Huxley
  • Wraith
  • Shoov
  • Gemini
  • Galen Framework
  • SikuliX

SikuliX

SikuliX IDE 실행

java -jar sikulixide-2.0.4.jar
IDE 실행을 하면, Jython 이나 JRuby 를 설치해야 모든 기능을 할 수 있다고 나온다. 아래 page 를 참고하면 JPython 을 설치할 수 있다. 그냥 sikulixide-2.0.4.jar 와 같은 path 에 jar 을 넣어놓으면 된다.

console 에 log 를 같이 찍으려 할 때

java -jar sikulixide-2.0.4.jar -d 3 -c
-c : IDE message 영역에 있는 내용을 command line output 으로 보내준다.
-d 3 : debug level 을 set

command line option 설명

Hello World

Window10 에서 SikulX v2.0.4 로 tutorial 을 해봤지만 제대로 동작하지 않는다.

See Also

Reference

  1. Sikuli Tutorial: Automate Desktop & Windows Application With Selenium Integration | Inviul

[컴] 3D 모델링 관련 sites


3d modelling / 3d printer / 3d 프린터 /

3D 모델링 관련 sites