
BigBlueButton 2.2.4 미만 버전에는 민감한 파일에 접근할 수 있는 LFI 취약점이 있습니다. 🚨
BigBlueButton 2.2.4 미만 버전에는 민감한 파일에 접근할 수 있게 하는 LFI 취약점이 있습니다.
BigBlueButton 인스턴스에서 진행된 원격 수업 중, 같은 반 학생이 선생님의 슬라이드 발표 링크를 공유했고 저는 URL에 파일 이름이 포함되어 있다는 것을 알아챘습니다.

Student: "No need to write notes, I've got the slide."
Me: Well, I've got a security report to make. 😂
조금 조작해 보니 서버의 /etc/passwd 파일에 접근할 수 있었고, 오픈소스 Big Blue Button 솔루션에 보안 취약점이 존재한다는 것을 발견했습니다.
취약점을 보고했고, BBB 팀은 신속하게 답변하고 며칠 만에 취약점을 패치했습니다.
public File getDownloadablePresentationFile(String meetingId, String presId, String presFilename) {
log.info("Find downloadable presentation for meetingId={} presId={} filename={}", meetingId, presId, presFilename);
File presDir = Util.getPresentationDir(presentationBaseDir, meetingId, presId);
return new File(presDir.getAbsolutePath() + File.separatorChar + presFilename);
}
보시다시피 PresentationController에서 사용하는 이 메서드는 3개의 매개변수를 연결하여 프레젠테이션 파일을 다운로드할 수 있게 합니다.
이를 통해 다음과 같은 링크를 얻을 수 있습니다:
https://test.bigbluebutton.org/bigbluebutton/presentation/download/ffc98830dbfbac3dcc80cc4c5f30711ebd1c23e8-1586764259489/d2d9a672040fbde2a47a10bf6c37b6a4b5ae187f-1586764259500?presFilename=d2d9a672040fbde2a47a10bf6c37b6a4b5ae187f-1586764259500.pdf
취약점을 악용하려면 프레젠테이션 파일의 유효한 링크를 얻은 다음 presFilename 매개변수를 수정하여 중요한 파일에 접근하면 됩니다.
https://test.bigbluebutton.org/bigbluebutton/presentation/download/ffc98830dbfbac3dcc80cc4c5f30711ebd1c23e8-1586764259489/d2d9a672040fbde2a47a10bf6c37b6a4b5ae187f-1586764259500?presFilename=../../../../../etc/passwd

BBB 팀은 서버 구성 규칙(HTTP), 정규식 및 정확한 파일 이름 형식을 통해 2.2.4 버전에서 취약점을 패치했습니다.
location /bigbluebutton/presentation/download {
return 404;
}
location ~ "^/bigbluebutton/presentation/download\/[0-9a-f]+-[0-9]+/[0-9a-f]+-[0-9]+$" {
if ($arg_presFilename !~ "^[0-9a-f]+-[0-9]+\.[0-9a-zA-Z]+$") {
return 404;
}
proxy_pass http://127.0.0.1:8090$uri$is_args$args;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Workaround IE refusal to set cookies in iframe
add_header P3P 'CP="No P3P policy available"';
}