ur0n2 / dotfiles-for-windows

dotfiles for windows
MIT License
6 stars 0 forks source link

lnk 실행 시 보안경고 창 #9

Closed ur0n2 closed 7 years ago

ur0n2 commented 7 years ago

ads확인

ur0n2 commented 7 years ago

dir /R로 ads 영역 확인 3=internet download 파일

ur0n2 commented 7 years ago

notepad [filename]:Zone.identifier로 3인지 확인

ur0n2 commented 7 years ago

첫실행에서 해제 해주기로

ur0n2 commented 7 years ago

@Zone.Identifier 영역 내용 확인 more < n.lnk:Zone.Identifier notepad n.lnk:Zone.Identifier Get-Item .\for_my\executable_and_ini* -Stream Zone.Identifier

@Zone.Identifier 영역 삭제 remove-item .\n.lnk -stream Zone.Identifier

@Zone.Identifier 영역 삭제 with Unblock-File https://technet.microsoft.com/ko-kr/library/jj628241.aspx Remove-Item cmdlet을 사용하여 대체 데이터 스트림을 삭제할 수 있습니다. 하지만 인터넷에서 다운로드한 파일을 차단하는 보안 검사를 제거하는 것은 권장되는 방법이 아닙니다. 다운로드된 파일이 안전한지 확인하려면 Unblock-File cmdlet을 사용합니다.

gci -Recurse | ForEach-Object{ Unblock-File $_.FullName}

ur0n2 commented 7 years ago

Unblock-File은 Powershell v3.0이상 if ($PSVersionTable.PSVersion.Major -eq 3) { gci $env:systemdrive\linked -Recurse | ForEach-Object{ Unblock-File $_.FullName} } else{

gci $env:systemdrive\linked -Recurse

한줄로 ->

gci .\7z1604-x64.exe | foreach{ $a="echo.>" + $_.FullName + ":Zone.Identifier"}

cmd /c $a

gci .\7z1604-x64.exe | foreach{ $a="echo.>" + $_.FullName + ":Zone.Identifier"; cmd /c $a}

}

ur0n2 commented 7 years ago

다운로드 받은 파일은 Zone.Identifier=3으로 인터넷이라서 그렇고. 바로가기도 실행경고가 뜰 수 있는건 icacls "Example.lnk" /setintegritylevel L 일 문제