Localhost Default Credentials - Exploited

credsProvider = new BasicCredentialsProvider();
credsProvider.setCredentials(new AuthScope(target.getHostName(), target.getPort()), new UsernamePasswordCredentials(login,
password));
try (CloseableHttpClient httpclient = HttpClients.custom().setDefaultCredentialsProvider(credsProvider).build()) {

AuthCache authCache = new BasicAuthCache();
BasicScheme basicAuth = new BasicScheme();
authCache.put(target, basicAuth);
HttpClientContext localContext = HttpClientContext.create();
localContext.setA
Detected 1 occurrence(s) of ‘\s*pass[word]+\s*[:=]\s*[“‘][a-z0-9\-_\!\$]+[“‘]':
eedup
public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();


public static void main(String[] args) throws Exception
{
String scheme = "http";
String host = "localhost";
int port = 9001;
String login = "admin";
String password = "nimda";


getDataFromWs(scheme, host, port, login, password,

"/catalogs/blackberryProductCatalog/catalogversions/Online/products/SPA-60801-001",
"{\"@uri\": \"http://localhost:9001/ws410/rest/catalogs/blackberryProductCatalog/catalogversions/Online/
Previous Post Next Post

You might also like: