How to send a string format exploit through socket

I’m doing a CTF exercise here:

https://c-wars.acnr.se/download/level2.tgz

There is a docker with the vulnerable service, which I need to found the value of a variable. I was able to do it by the following input:

== Login Service 1.0 == Username: %7$  s Password: a Welcome: ACNR{_SERVICE_FLAG_} 

My issue now is that the submission needs to call a function that is going to send this string by a socket, so I guess I need to escape it. I have tried %7$ s, but didnt worked.

Submission format can be found at https://c-wars.acnr.se/download/MANUAL.pdf

#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <stdint.h> #include "gamelib.h" uint32_t main(uint32_t argc, uint8_t ** argv) { svc_init(); svc_set(10000); svc_writeln("gimme flag"); svc_readuntil('}'); return 0; } 

French Outdoor Socket Made in China

◆ Our History
Found 1994 in years. We are largest power connector manufacturer in Asia now
◆ Our Factory
More than 4000 skilled workers. 280QC , 85 engineers, 95% of parts is produced by ourselves, including tooling. Plastic, hardware and assembly workshop. The whole product area: 130000m2
◆ Our Product
Extension cord, cable reel, power socket, adapter, house appliance
◆ Product Application
Power connector for household
◆ Our Certificate
CE, GS, VDE, NF, IMG, ETL, UL, SAA, S, BSCI, ISO90001
◆ Production Equipment
Injection/ wire stripping machine/ Welding machine.
◆ Production Market
The EU, Australia, Asia, and North America. Customers include IKEA, TESCO, LIDL. ALDI. Kingfisher, ADEO, Etc… Turnover : USD 250 million.
◆ Our service
High quality and delivery date on time. Professional sales team to service all customers. French Outdoor Socket Made in China
website:http://www.hongyitechgroup.com/

Socket Type Filter

Company Introduce:
We are the professional manufacturer of reactor, power supply filter, electric heater and inductance coil. Products are widely used for air conditioner, refrigerator, washing machine, UPS power supply, communication facilities, automatic control circuit and a variety of electronic equipment.
We already established long-term partnership with Midea, Galanz, Hisense, Kelon, Aux and Astrodyne Corporation. Our excellent quality, reasonable price, perfect service system to win customers’ trust and social’s consistent high praise. After years of technical accumulation and exploration, our company has a positive development, and innovation technical team, made great achievement in scientific research.
Our company has perfect, perfect management system. First-class production facilities, quality testing equipment, strong engineering teams and a group of professional management personal, and establish a set to confirm to the international standards of quality management system. Our company has passed the ISO9001 quality management system certification and CQC, TUV,UL, S product certification, The company is constantly developing and growing every day.
Quality first, customer first is our eternal purpose, the company will be the spirit of “Innovation Endless” thought, further to absorb domestic and foreign advance technology, synchronous trend of reform, strive to create an international brand and strive to expand domestic and foreign markets, dedication to work together with customers to create a better tomorrow.
Product Application:
•Electrical and electronic equipment
•Office automation equipment
•Datacom equipment
•Household equipment
•Medical equipment
•Consumer goods
•Industrial applications
•Building automation
•Machinery
•Various noisy applications requiring good filter performance
Technical Parameter:
Technical Data
Rated Voltage250VAC
Operating Frequency50/60Hz
Rated Current1Ato20A
H1-pot:(1 min)1500VAC(line/ground)
Climatic Category25/085/21
Schematic
Mechanical Dimensions
Packing and Transportation:
What can we do for you?
1. We can offer free samples.
2. OEM/ODM orders welcome
3. Great variety of products with competitive price
4. Protection of your sales area, ideas of design and all your private information
5. Strict quality testing and control procedure to make sure superior quality   
6. With efficient and professional after-sale service.Socket Type Filter
website:http://www.cepc-elec.com/emi-filter/socket-type-filter/

Is RSA usage in combination with Java Socket secure?

I want to create a java program for server client communication. Therefore first the client creates a RSA keypair. Then the client sends the public key to the server. After that the server will create a RSA keypair and also send its public key to the client. Is it safe to say that now (after key exchange) it is safe to send all kind of data between server and client?

Or is it smart to create a SSLSocket? I honestly have no idea how the authentication with the certificats work and I also do not want to have a certificate which needs an update every now and then.

problema al enviar objeto por socket nodejs

estoy trabajando con nodejs y express como framework, hago una consulta a mi base de datos mysql, envío esa consulta al cliente para poder separarlo y mostrar por fechas en un fullcalendar.

codigo del servidor

var links; io.sockets.on('connection', function (socket) { socket.emit('news', {links}); socket.conn.close ();    },2000);     router.get('/grafica/:id',async (req,res,next)=>{    const {id} = req.params;   links= await pool.query('SELECT * FROM historial WHERE id_paciente=?', [id]);  res.render('date_real/grafica');    }   );  

codigo del cliente

var socket = io.connect('127.0.0.1:5000'); console.log('conectado');  socket.on('news', function (data) {    Object.keys(data).forEach(function(key) {      row = data[key];   });  console.log(row.length); 

la consulta lo recibe correctamente el cliente hasta cierto tamaño del objeto ya que muestra las fechas en el fullcalendar, me doy cuenta con el console.log(row.length); que solo lo soporta cuando su tamaño es de 87, si se pasa, el fullcalendar se queda en blanco, no se si la forma en que mando los datos sea la correcta, estaría muy agradecido si pudieran ayudarme.

¿Como enviar un dato por medio de Socket a un arduino con modulo wifi y direccion ip fija desde android?

estoy utilizando un arduino mega con un modulo wifi HLK-RM04 con una direccion ip y puerco fijas, ese modulo funciona como un router, en android studio tengo un metodo que al momento del onCreate() llamo a ese metodo, pero en mi monitor serie no logro recibir ese dato.

este es mi metodo

public void Socket(){         OutputStream out=null;     try {          InetAddress serverAddr = InetAddress.getByName("192.168.0.30");         Socket socket = new Socket(serverAddr, 8080);         out=socket.getOutputStream();         DataOutputStream output=new DataOutputStream(out);         output.write("m".getBytes());          output.close();      }catch (NumberFormatException e) {         e.printStackTrace();     } catch (UnknownHostException e) {         e.printStackTrace();     } catch (IOException e) {         e.printStackTrace();     }  } 

y este es mi codigo en arduino

void loop() {   if(Serial.available()>0){ char dato=Serial.read();   if(dato=='m'){     Serial.print("palabra");   } } 

}

he utilizado la aplicacion de play store Serial Wifi Terminal y sin problemas puedo enviar el dato “m” y lo logro visualizar en mi monitor serial. ¿algun metodo o algo que estoy haciendo mal?

Scrapebox Link Extractor problem socket error 10038


.png   problem-socket-error-scrapebox-vps-10038.png (Size: 34.58 KB / Downloads: 1)
Hello,

I have 3 VPS with windows server 2012 from the same provider. I have one scrapebox on each.
It’s been month I’m using it. It was working great until 3 weeks ago.

Before I was doing link extractor with 500 threads no problem.
Now, when I do a link extractor I have a socket error 10038 on almost all urls. (see image).

It’s working only if I use 1 thread with 5 seconds delay (or more).

I have checked the windows parameters, there is no firewall and no virus software installed or enabled.

Is it possible that it’s the VPS provider that is limiting the connexion ?

Does someone had the same error previously ?Anyone

Thanks a lot

How to send packets at 512 nano sec delay using Socket Programming and UDP socket

Using SOCK_DGRAM for UDP sockets

All packets are 22 bytes in length (ie 64 including headers)

client.c

...     no_of_packets--;     sprintf(buf, "#:!0 rem");     sprintf(buf, format , buf);     sprintf(buf_aux, "#: 0 rem");     sprintf(buf_aux, format , buf_aux);     buf[MAX_LINE-1] = '';     buf_aux[MAX_LINE-1] = '';     len = strlen(buf) + 1;     send(s, buf, len, 0);     while (no_of_packets-- > 1) {         nanosleep(&T, NULL);         send(s, buf, len, 0);     }     send(s, buf_aux, len, 0); 

server.c

... while(1) {         if (len = recv(s, buf, sizeof(buf), 0)){             // do nothing         } }  

When I open Wireshark to see avg delay between the packets which are sent,

I can see the following:

  • MIN delay: 0.000 006 795 sec => 6 micro sec

  • MAX delay: 0.000 260 952 sec => 260 micro sec

  • But I want to send packets every 512 nano sec (ie., 0.512 micro sec).

How can I achieve this speed?

63 Amp Commando Socket With Isolator factory

Our History
◆2006
Mr. Greg established Saip Electric Group Co., Ltd. in Liushi Town-China’s Electric Appliance Center-on May 8, 2006 and set up Saipbrand in the same year.

◆2009
The Company headquartered in Liuchuan Building onJune 8, 2009 and started to develop and expand its E-commerce team. In the sameyear in Liushi Industrial Zone, the Company started to establish its owntechnology team with independent R&D capacity. As a result of that, ourproduction capacity evolved rapidly.

◆2011
The Company created Saipwell brand and established Saipwell Electric Co., Ltd. in May 2011 todevelop overseas market.

◆2013
The Headquarter of Saip Electric Co., Ltd. relocatedin the Science Building in Liushi Industrial Zone in September 2013. Coveringan area of 3000 square meters, the office building has been well equipped withcanteen, activity center, conference center, and display halls.

◆2014
15 On March 15, 2014, the three day long annualmeeting of the Group was held grandly in the“Beijiao Hotel”in Gucun Park, Shanghai City. During the meeting, all the staff participated in thewell-prepared “Woodpecker” Revelry Party on a cruiseship on Huangpu River.
In the beginning of 2014, we invested more ininformation technology and introduced OA, Enter, and HR management software tocontinue to improve our management system. Having newly introduced Aliexpress, ebay and other E-commerce platforms and by fully upgrading TrustPass and ourofficial website, we have developed dozens of categories and thousands of typesof new products. In the same year, Shanghai Saipwell Electric Co., Ltd.relocated to Redstone Technology Building in Shanghai, employing 150 salesengineers and recruiting agents all over the world.

◆2015
On December 23, 2015, we were awarded with thetitle of Alibaba’s Dream Trip-“B2B Cross-border E-commerce Demonstration Base”by Alibaba Zhejiang Region. General Manager Wu Xiaofei attended the award ceremony.
On November 23, 2015, Mr.Wu Xiaofei, General Manager of the Company won the Award of Most Popularity during the Alibaba “Moving E-commerce Person of Zhejiang Province” Campaign.
From November 3 to 7 of 2015, we made our remarkable debut in the 18th Industrial Fair in Shanghai and achieved a great deal in the fair.
On August 8, 2015, the three-day-long 2015 Mid-year Management Meeting of Saip Group was held in Meilan Lake International Conference Center in Shanghai. During the conference,the mid- and high-level management of the Company took part in the “Fun inMeilan Lake, Enjoy Golf” activity organized by the Company.
Inthe morning on April 3, 2015, Saip Electric Group grandly held the 2014“Pragmatism, Innovation, Cooperation, Dream” Appraisal Meeting in the Wealth Hall of Hawaii Hotel. General Manager of the Group, Mr. Wu Xiaofei, and other leaders and department workers participated in the meeting.
In April 2015, T-mall Business Division launched E-shop, an excellent E-commerce software. The launch of this software not only brings customer with more superior shopping experience but also underpins a more solid foundation for the rapid growth of our T-mall Business Division.

◆2016
In February 2016, our General Manager Mr. WuXiaofei visited and investigated on Indian market. He was warmly welcomed by Mukhtar Abbas Naqvi, Minister of Internal Affairs in India.In New Delhi, the Minister and Mr. Wu Xiaofei had a friendly conversationand took photos together.
In January 2016, our General Manager Mr. Wu Xiaofei was awarded with thetitle of “2015 Positive Energy of New Foreign Trade in Zhejiang Region” byAlibaba.
In January 2016 we were awarded with the title of“Superior Client of Zhejiang Region” granted by Alibaba and we were appointedas an E-commerce learning base. Our Sales Director Mr. Wu Xiaoyang attended theaward ceremony.
In January 2016, our E-commerceplatform continued to hold the “Key Enterprise of Service Industry” awardgranted by the People’s Government of Liushi Town for recognizing ouroutstanding performance in high- and new-tech E-commerce service industry.

Our Factory
Saip Electric Group Co . , Ltd ( called ” Saip ” forshort ) is an enterprise specialized in design, production and sales of electricequipments. Head office located in the largest manufacturing base of electricequipment of Wenzhou China, which is called  ” the Electric Equipment Capital of China ” , next to Shanghai and Ningbo Ports. Saip has Five specialized branches, over 300 specialized cooperative partners. Saip, an ISO9001 certificatedenterprise, owns modern production lines and high quality controlling equipmentwith scientific administration, professional engineers, highly trained teamstechnicians and skilled workers. Now Saip has five design and production basesin Hong Kong, Taiwan, Singapore, Turkey and Shanghai (China Mainland), 28 salesorganizations in the world and more than 50 holding member enterprises. Saipproducts cover wind energy, solar energy, low-voltage apparatus, welding equipment,instrument and meter, photoelectron, electrical products for construction,automobile apparatus and industrial automation, The products are sold to morethan 100 countries and regions. All exported products have passed through thecertification of CE and partial products have passed through several kinds ofinternational certification like ROHS, TUV, UL, KEMA, S, SIRIM and so on.Saipas always inherits “high quality and sincere service”. Saip—yoursuccessful cooperative partner!

Product Application
Electricity for industry and outdoor Home use.

Our Certificate
ISO 9001, CE, ROSH.

Production Equipment
Injection molding machine, die casting machine, laser cutting machine, bending machine, welding machine, foaming dispenser, packaging machine.

Production Market
North America-25.00%, South Asia-5.00%, South America-10.00%, Southern Europe 5.00%, Northern Europe 10.00%, Western Europe 10.00%; Eastern Asia 5.00%, Mid East 5.00%, Oceania 10.00%, Africa 5.00%, Southeast Asia 5.00%, Eastern Europe 5.00%.

Our Service
Pre-sales: 24 hours response;
Sale: professional product introduction, providing customers with the perfect solution;
After-sale: the product provides one year of free quality replacement service, providing permanent technical support.63 Amp Commando Socket With Isolator factory
website:http://www.esaipwell.com/

Mostrar imagenes mediante socket (PHP)

Tengo un proyecto personal, es una sala de chat, la estoy haciendo a modo ‘entrenamiento’ en el mundo de los sockets.
El chat funciona correctamente, pero se me ocurrió poder hacer que el user comparta imagenes.
Para ello, existe un boton (html), que permite seleccionar una imagen, despues la paso a base64 y la paso como mensaje.
El problema esta en que el socket no lo llega a recibir. El problema no es la comunicacion, ya que el chat funciona, es el tamaño del buffer.
He probado a subirlo a 10MB, pero sin cambios.

Codigo

webSocket.php

Me salto la parte del handshaking para no hacerlo mas grande…

        //Create TCP/IP sream socket         $  socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);         //reuseable port         socket_set_option($  socket, SOL_SOCKET, SO_REUSEADDR, 1);         //bind socket to specified host         socket_bind($  socket, 0, $  port);         //listen to port         socket_listen($  socket);         //create & add listning socket to the list         $  clients = array($  socket);         //start endless loop, so that our script doesn't stop         while (true) {             //manage multipal connections             $  changed = $  clients;             //returns the socket resources in $  changed array             socket_select($  changed, $  null, $  null, 0, 10);              //check for new socket             if (in_array($  socket, $  changed)) {                 //CUANDO CONECTA SALTA AQUI                 $  socket_new = socket_accept($  socket); //accpet new socket                 $  clients[] = $  socket_new; //add socket to client array                  $  header = socket_read($  socket_new, 1024*1024*5); //aqui es el tamaño en bytes del socket                 perform_handshaking($  header, $  socket_new, $  host, $  port); //perform websocket handshake                  socket_getpeername($  socket_new, $  ip); //get ip address of connected socket                 $  response = mask(json_encode(array('type'=>'system', 'message'=>'Nuevo Conectado!'))); //prepare json data                 $  ahora = date("d-m-Y H:i:s");                 echo "$  ahora --> Conexion aceptada, handshake realizado con exito...\n";                 send_message($  response); //notify all users about new connection                  //make room for new socket                 $  found_socket = array_search($  socket, $  changed);                 unset($  changed[$  found_socket]);             } } 

index.html

txt = $  ("#texto").val()         var msg = {             'id': id,             'user': user,             'type': 'mensaje',             'message': txt         };         console.log(txt);         websocket.send(JSON.stringify(msg)); 

En index.html txt ya esta en Base64, contiene la imagen y esta en formato correcto.
Si lo pruebo con una imagen de 5Kb funciona.

Si falta alguna información pedirla.