Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exploit heuristics & task limit #51

Closed
wants to merge 16 commits into from
Closed

Conversation

KSAlpha
Copy link
Member

@KSAlpha KSAlpha commented Aug 12, 2018

Fixes #54

@KSAlpha KSAlpha added the new feature New features to develop label Aug 12, 2018
@KSAlpha KSAlpha added this to the DEFCON 26 milestone Aug 12, 2018
@KSAlpha KSAlpha self-assigned this Aug 12, 2018
@KSAlpha KSAlpha requested a review from Qwaz August 12, 2018 02:29
@KSAlpha KSAlpha changed the title Features/exploit heuristics Exploit heuristics & task limit Aug 12, 2018
@Qwaz
Copy link
Member

Qwaz commented Aug 20, 2018

마무리 된건가요 진행중인가요?

owl-daemon/src/db/models.rs Show resolved Hide resolved
owl-cli/src/exploit.rs Show resolved Hide resolved
owl-daemon/src/handler/exploit.rs Outdated Show resolved Hide resolved
owl-cli/src/exploit.rs Outdated Show resolved Hide resolved
owl-daemon/src/handler/exploit.rs Outdated Show resolved Hide resolved
owl-daemon/src/handler/exploit.rs Outdated Show resolved Hide resolved
owl-daemon/src/handler/exploit.rs Outdated Show resolved Hide resolved
owl-daemon/src/handler/exploit.rs Show resolved Hide resolved
owl-daemon/src/lib.rs Show resolved Hide resolved
@Qwaz
Copy link
Member

Qwaz commented Aug 20, 2018

더 복잡할 줄 알았는데 생각보다 바뀐 코드 양은 적네요

@KSAlpha KSAlpha modified the milestones: DEFCON 26, 2018-3Q Aug 24, 2018
Qwaz
Qwaz previously approved these changes Aug 24, 2018
Copy link
Member

@Qwaz Qwaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

돌려 보면 좋지만 강수님을 믿고 승인합니다

@KSAlpha
Copy link
Member Author

KSAlpha commented Aug 24, 2018

개인적으로 테스트 해본 다음에 머지하겠습니다

@KSAlpha
Copy link
Member Author

KSAlpha commented Aug 24, 2018

#54

@KSAlpha KSAlpha changed the base branch from dev to master December 19, 2018 14:38
.gitignore Show resolved Hide resolved
Copy link
Member

@Qwaz Qwaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

딱 한 가지 PR 승인 전에 고쳐야 한다고 생각하는게 failure입니다. owl exploit failure만 보고서는 무슨 커맨드인지 알 수가 없어 개선이 필요합니다. 지금 당장 떠오르는 이름이 없더라도 최소한 run-all처럼 update-failure 또는 update-fail-count 정도의 설명은 있어야 한다고 봅니다. 아래는 관련 선언 목록입니다.

  • owl-cli: exploit.rs의 SubCommand failure
  • owl-rpc: lib.rs의 RPC 선언의 failure_exploit
  • owl-rpc: model/exploit.rsExploitFailureParams
  • owl-daemon: handler/exploit.rsfailure_exploit
  • owl-daemon: lib.rsFailureExplotFutfn failure_exploit

.gitignore Show resolved Hide resolved
owl-cli/src/exploit.rs Outdated Show resolved Hide resolved
owl-daemon/src/main.rs Outdated Show resolved Hide resolved
owl-daemon/src/main.rs Show resolved Hide resolved
owl-cli/src/exploit.rs Outdated Show resolved Hide resolved
owl-daemon/src/handler/exploit.rs Outdated Show resolved Hide resolved
owl-daemon/src/handler/exploit.rs Outdated Show resolved Hide resolved
exploit_targets::service_variant_id
.eq(service_provider.service_variant_id),
),
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 트랜잭션 걸면 괜찮은가 싶어서 찾아봤는데 문제가 생길 수 있는 부분이긴 하네요.
https://blog.sapzil.org/2017/04/01/do-not-trust-sql-transaction/

Ok(())
}
},
Err(_) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExploitTarget 업데이트 할 때마다 이렇게 존재 유무 체크하는것보다 exploit ID랑 service variant ID 받아서 없으면 만들어주는 함수 하나 만드는게 좋아 보이는데 나중에 합시다

owl-cli/src/exploit.rs Show resolved Hide resolved
arg_match_numeric_none -> parse_numeric_or_none
arg_match_numeric_disable -> parse_numeric_or_disable
failure_count -> current_failure_count
Indentation issues
Log message improvements
@KSAlpha
Copy link
Member Author

KSAlpha commented May 13, 2019

DEFCON 시즌이 찾아와 다시 부활했습니다.

미해결된 몇가지 CR도 있지만, failure의 네이밍이 더 큰 발목을 잡고 있는 상태군요.

저희가 처음에는 이 기능을 heuristic 처럼 넣기로 했었지만, 지금 다시 살펴보니 휴리스틱보다는 오히려 익스플로잇 실행에 대한 조건을 지정하는 정도로 보입니다. 여기서는 '몇번 연속으로 실패시, 자동 익스플로잇 실행을 멈춘다.' 정도에 해당하겠죠? 그래서 차라리 rule이라는 새로운 커맨드 / 영역을 만드는게 좋아보입니다.

이렇게 해놓으면 추후에 추가적인 규칙들을 구현해볼 수도 있습니다. 예시로, '10번 연속 실패하면 실행을 멈추지만 아직 15번 이상 실행된 적이 없다면 계속 한다.' 같은 추가적인 옵션을 생각해볼 수 있습니다.

일단 이런 방향성을 생각해두고 있습니다. 이 PR이 머지되는대로, 전체적인 코드 정리를 수행할 계획(#61) 입니다.

@Qwaz
Copy link
Member

Qwaz commented May 17, 2019

CTF가 시간 제한이 있다 보니 룰을 실제로 구현할만한 상황이 될지 약간 걱정이 되지만, 휴리스틱 구현을 위해 스크립팅을 지원하는 아이디어 자체는 참신하고 좋습니다.

@KSAlpha KSAlpha added the wontfix This will not be worked on label May 21, 2019
@KSAlpha KSAlpha removed this from the 0.1.0 milestone May 21, 2019
@KSAlpha KSAlpha closed this May 21, 2019
@KSAlpha KSAlpha deleted the features/exploit-heuristics branch May 23, 2019 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New features to develop wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exploit heuristics assumes fail if future results in error
2 participants