Created
March 25, 2021 12:19
-
-
Save artem-smotrakov/8f9d666cc58ccff9dd50d42a3cc1d68d to your computer and use it in GitHub Desktop.
An example of a vulnerable HTTP endpoint based on HttpInvokerServiceExporter (CVE-2016-1000027)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Configuration | |
| class Server { | |
| @Bean(name = "/account") | |
| HttpInvokerServiceExporter accountService() { | |
| HttpInvokerServiceExporter exporter = new HttpInvokerServiceExporter(); | |
| exporter.setService(new AccountServiceImpl()); | |
| exporter.setServiceInterface(AccountService.class); | |
| return exporter; | |
| } | |
| } | |
| class AccountServiceImpl implements AccountService { | |
| @Override | |
| public String echo(String data) { | |
| return data; | |
| } | |
| } | |
| interface AccountService { | |
| String echo(String data); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment